• 로그인 함 해보끄나?

  • Sarangnamu.net June 17, 2003
    Home Login Profile Study Open Project Q&A Google Code
    CStaticExBitmapTitle
    Last Modify : 27 December, 2010(12:30)
    //
    // DATE    : March 06, 2007 10:53:10
    // CODER   : Kurome(ccd@apsat.co.kr)
    // URL     : http://www.apsat.co.kr
    // 
    // Copyright Asia pasific satellite industries Co., Ltd. 
    // 
    // -----------------------------------------------------------
    // Require
    // -----------------------------------------------------------
    // CStaticExBitmap
    // http://www.sarangnamu.net/basic/basic_view.php?no=2845
    //
    // -----------------------------------------------------------
    // NOTE : March 06, 2007 10:53:15
    // -----------------------------------------------------------
    // * 
    //
    
    #include "StdAfx.h"
    #include "StaticExBitmapTitle.h"
    
    CStaticExBitmapTitle::CStaticExBitmapTitle(void)
    : m_nMargin(10)
    , m_bBitmapTitleSet(false)
    {
    	// FOR MMU
    	m_crFontColor = RGB(255, 255, 255);
    	m_nHeight	  = 14;
    	m_bFontBold	  = true;
    }
    
    CStaticExBitmapTitle::~CStaticExBitmapTitle(void)
    {
    }
    
    void CStaticExBitmapTitle::InitObject(CDC* pDC)
    {
    	CStaticExBitmap::InitObject(pDC);
    
    	if (!m_bBitmapTitleSet)
    	{
    		m_rect.right = mDC.GetTextExtent(m_szWindowText).cx + (m_nMargin * 2);
    		MoveWindow(10, 10, m_rect.Width(), m_rect.Height());
    
    		m_pStretchPos->nCenterLX	= m_rect.Width() - bm[_LEFT].bmWidth - bm[_RIGHT].bmWidth;
    		m_pStretchPos->nRightPos	= m_rect.Width() - bm[_RIGHT].bmWidth;
    
    		m_bBitmapTitleSet = true;
    	}
    }
    
    #pragma once
    #include "staticexbitmap.h"
    
    class CStaticExBitmapTitle :
    	public CStaticExBitmap
    {
    public:
    	CStaticExBitmapTitle(void);
    	~CStaticExBitmapTitle(void);
    
    protected:
    	int m_nMargin;
    	bool m_bBitmapTitleSet;
    
    protected:
    	virtual void InitObject(CDC* pDC);
    };
    

    Comment


    입력하3 1508232048



    Locations of visitors to this page