Jump to content

Featured Replies

Posted

Well, I want to make a dynamic bitmap loading thingamajig, but I can only seem to do it so far, with resources.

 

Image = LoadBitmap(GetModuleHandle(NULL),MAKEINTRESOURCE(ID_BITMAP));

 

That works. ID_BITMAP is as follows:

 

ID_BITMAP BITMAP "bitmaps\\test.bmp"

 

However, when I try to change it to:

 

Image = LoadBitmap(GetModuleHandle(NULL),"bitmaps\\test.bmp"); (which it should be able to do).

 

It doesn't work. What's wrong?

  • Author

.... What?

 

The MSDN says it can also be a path to the thing. MAKEINTRESOURCE is optional.

Pointer to a null-terminated string that contains the name of the bitmap resource to be loaded.
You gotta have it in resources, so no path.. think that'll work?
  • Author
You gotta have it in resources, so no path.. think that'll work?

 

Is there anyway to use a path that's defined during runtime?

Guest
This topic is now closed to further replies.