Hi,
I'm wanting to get a handle to a bitmap (not in a resource!) and I'm using:
HBITMAP ButtonPic;
ButtonPic=(HBITMAP)LoadImage(NULL,"C:\\ETInt\\V02\ \pic.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREA TEDIBSECTION);
Is this correct? Thanks!
Uni
Printable View
Hi,
I'm wanting to get a handle to a bitmap (not in a resource!) and I'm using:
HBITMAP ButtonPic;
ButtonPic=(HBITMAP)LoadImage(NULL,"C:\\ETInt\\V02\ \pic.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREA TEDIBSECTION);
Is this correct? Thanks!
Uni
Looks good to me. I think there might be an LR_FILENAME thing in there somewhere, too. But I think that should work. Does it?
Well...that's the trouble :rolleyes:. This is to put in with a custom button, which can have a resource of the bitmap or a handle to a file. Since I don't have a resource I'm doing it like this. But its not adding the bitmap to the button... :(
Check the return value from LoadImage(). If the call works, it returns a handle, if not NULL. If it is returning a handle, then the problem is somewhere else, if it is returning NULL, call GetLastError() to find out why.