Sign in to follow this  
brechtjah

Resource file

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: http://msdn.microsoft.com/en-us/library/bb760767(VS.85).aspx#image_static_control

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this