Bitmap Display Problems
-
Hi, I am trying to display a bitmap in a SDI applicationg and for some reason it wont display the bitmap. Here is the code I am using. Any suggestions would be greatly appreciated. CStatic myStatic; myStatic.Create(_T("My Static"), WS_CHILD|WS_VISIBLE|SS_BITMAP, CRect(10,10,100+505,100+435), this); myStatic.SetBitmap( ::LoadBitmap(NULL, MAKEINTRESOURCE(IDB_BITMAP1)) ); Thanks for the help.
-
Hi, I am trying to display a bitmap in a SDI applicationg and for some reason it wont display the bitmap. Here is the code I am using. Any suggestions would be greatly appreciated. CStatic myStatic; myStatic.Create(_T("My Static"), WS_CHILD|WS_VISIBLE|SS_BITMAP, CRect(10,10,100+505,100+435), this); myStatic.SetBitmap( ::LoadBitmap(NULL, MAKEINTRESOURCE(IDB_BITMAP1)) ); Thanks for the help.
hInstance parameter (first one) from LoadBitmap should be the instance of the module that contains the bitmap . In your case your application. You can use it as NULL only for predefined bitmaps like OBM_CLOSE. Regrads, /REMUS