// CBitmapButton 클래스 이용방법! <== 비트맵이 4장이 필요.
// CBitmap 클래스 이용방법! <== 비트맵 한장으로 한다. 컨트롤 변수 필요.
// dlg에 버튼 스타일 지정.
// CBitmap으로 할때 Default Botton, Bitmap 체크해준다, 커트롤 변수생성!
// CBitmapBUtton 할때 Owner draw 체크.
class CMFC0419Dlg : public CDialog
{
// Construction
public:
CMFC0419Dlg(CWnd* pParent = NULL); // standard constructor
// 선언!
CBitmapButton BMPbutton;
CBitmap m_bmp;
}
BOOL CMFC0419Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
//--------------------------------------------------------------------------------------------
// 그림 한장으로할때!
// 버튼에 커트롤 변수 필요.
m_bmp.LoadBitmap( IDB_PLAY );
m_ctrPlay.SetBitmap( m_bmp );
//--------------------------------------------------------------------------------------------
// 4장으로 그림 올릴때!
// Bitmap올릴때 " "안에 넣는다.
// D, F, U, X; 눌리지 않은상태, 포커스를 받은상태, 눌린상태, 비활성화된 상태
// "EXITD", "EXITF", "EXITU", "EXITX" 이렇게.
BMPbutton.AutoLoad( IDC_Exit, this );
return TRUE; // return TRUE unless you set the focus to a control
}
'IT > MFC' 카테고리의 다른 글
AquaButton: A sample custom button control with a Mac OS X look (0) | 2008.08.12 |
---|---|
CxSkinbutton (0) | 2008.08.11 |
codeprject round slider control (0) | 2008.08.10 |
codeproject round button (0) | 2008.08.10 |
Round Button Control - mfc 아님 (0) | 2008.08.10 |