Advertisement Jump to content
Sign in to follow this  

Resource file

This topic is 3719 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

resource.h #define ID_bmpBar 301 resource.rc #include "resource.h" ID_bmpBar BITMAP "C:\\VERY_LONG_PATH\\bitmap.bmp" Is there a way to combine those two steps into one, so no resource file is required? Because I'm currently getting errors trying to get a bitmap on a static control
    stcStatic = CreateWindow("STATIC", ID_bmpBar, SS_BITMAP | WS_VISIBLE | WS_CHILD, 5, 10, 100, 10,
        hwnd, (HMENU) ID_stcStatic, hInstance, NULL);
Error: invalid conversion from int to const CHAR* EDIT: Generally what I'm trying to do here is putting an image on a static control. Do I have to call SendMessage with STM_SETIMAGE also? I mean I'm already giving the address as an argument to CreateWindow()... (I really need a good site about win32 stuff like this) [Edited by - brechtjah on November 10, 2008 4:17:24 PM]

Share this post

Link to post
Share on other sites
The best site for Win32 documentation is MSDN.

Read here for info about your specific problem:

There really is nothing I can add, other than to rephrase that image controls don't need a caption (just pass NULL or zero-length string) and instead require an STM_SETIMAGE message to be sent to them after creation. In your case, wParam = IMAGE_BITMAP and lParam would be the return value of LoadBitmap(). See LoadBitmap() documentation for more info.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!