LoadImage: how read a bitmap resource?

heres the code that i use for read a bmp resource:
1
2
3
4
5
6
7
8
//resource.h
#define subzero 102

//resource.rc
subzero BITMAP "C:\\Users\\Cambalinho\\Documents\\CodeBlocks\\classcontrols\\bin\\Release\\o_5c3b5bae618d9968-2.bmp"


HBITMAP bmpBitmap = (HBITMAP)LoadImage(GetModuleHandle(NULL),MAKEINTRESOURCE(subzero ), IMAGE_BITMAP, 0, 0, 0);

the bmpBitmap it's NULL and the GetLastError() give me 5: access denied.
why these error?
Last edited on
i can't answer how... but it's fixed.
why!?! because now works.
maybe because i was wrong on resource type(on GetResourceType()... my function)
thanks to all
Topic archived. No new replies allowed.