Bitmaps on Static Controls, How to ?
-
// Load Process HANDLE hBitmap; hBitmap = ::LoadImage( GetModuleHandle( rvl_null ), pathFileName, IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE ); m_pBitmaps[ i ].Attach( hBitmap ); // m_pBitmaps is an array of CBitmap ////////////////////// CStatic* pImageCtrl = rvl_null; pImageCtrl = ( CStatic* ) GetDlgItem( IDC_NEWMAP_DIALOG_IMAGE ); pImageCtrl->SetBitmap( HBITMAP( m_pBitmaps[ 0 ] ) ); I'm using this piece of code to place a bitmap inside a static control but it's not working as it should. What i'm doing wrong ? PS: Bitmaps are loaded from file. Thanks
-
// Load Process HANDLE hBitmap; hBitmap = ::LoadImage( GetModuleHandle( rvl_null ), pathFileName, IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE ); m_pBitmaps[ i ].Attach( hBitmap ); // m_pBitmaps is an array of CBitmap ////////////////////// CStatic* pImageCtrl = rvl_null; pImageCtrl = ( CStatic* ) GetDlgItem( IDC_NEWMAP_DIALOG_IMAGE ); pImageCtrl->SetBitmap( HBITMAP( m_pBitmaps[ 0 ] ) ); I'm using this piece of code to place a bitmap inside a static control but it's not working as it should. What i'm doing wrong ? PS: Bitmaps are loaded from file. Thanks