Given a line like this:
bitmapHandle = (HBITMAP) ::LoadImage(app->instance(),
MAKEINTRESOURCE(resourceID), IMAGE_BITMAP, 0, 0,
LR_DEFAULTSIZE|LR_CREATEDIBSECTION);
Why would the
LoadImage
fail if the
resourceID
is not ultimately
#defined?
In other words, if the header definition file defines the value passed into the function as
#define THE_RESOURCE 103
, then it works, even if it is passed throughout the callers as a
DWORD
or
unsigned int
. But if I change the definition in the resource file to
const WORD THE_RESOURCE = 103
, or an unsigned int, or another type, the
LoadImage
fails?
I'm curious more than anything, after butting my head against it for a couple minutes. As far as I can see,
MAKEINTRESOURCE
is doing its magic on the same exact number, and that is the only item that is different in the working and non-working version.
Thanks!