I want to display a bitmap with a static control. MSDN says that I should use the SS_BITMAP style and for the text (which I assume is the lpWindowName parameter of CreateWindowEx, please correct me if I'm wrong), I should put the name of the bitmap defined in the resource file, not the filename. How do I figure out the name of the bitmap? I've tried using the following for that parameter:
(IDB_BITMAP1 is the ID defined in resource.h, my resource file is celebrate_bitmap.rc, and the bitmap is saved as bitmap1.bmp)Code:TEXT("IDB_BITMAP1");
TEXT("celebrate_bitmap");
TEXT("bitmap1");
MAKEINTRESOURCE(IDB_BITMAP1); //fails even after loading the image, if that's even necessary
The function always returns 0 and the bitmap is not displayed. Obviously these do not work (they were a last resort guess), but I can't think of anything else. I am using Visual C++ 2005.