below code code snippet.
m_hBitmap = (HBITMAP)::LoadBitmap( g_hModule, MAKEINTRESOURCE(
IDB_BITMAP_BACKX ));
if( m_hBitmap ){IDB_BITMAP_BACKX ));
HWND h = Item( IDC_BU_XP ).handle;
LONG dw = ::GetWindowLong( h, GWL_STYLE );
::SetWindowLong( h, GWL_STYLE, ( dw & ~SS_ENHMETAFILE ) | BS_BITMAP | BS_CENTER );
::SendMessage( Item( IDC_BU_XP), BM_SETIMAGE,
(WPARAM)IMAGE_BITMAP, (LPARAM)m_hBitmap );
}
Here IDB_BITMAP_BACKX :- control id of bitmap control.
IDC_BU_XP :-control id of Button Control.
Also m_hBitmap is the object of HBITMAP.
Here IDB_BITMAP_BACKX :- control id of bitmap control.
IDC_BU_XP :-control id of Button Control.
Also m_hBitmap is the object of HBITMAP.
No comments:
Post a Comment