Cannot load an OEM resource

Started by
2 comments, last by sj 17 years, 11 months ago
For some reason, when I call "LoadImage(NULL, MAKEINTRESOURCE(OCR_NORMAL), IMAGE_CURSOR, 0, 0, LR_DEFAULTCOLOR|LR_DEFAULTSIZE);" I get an error saying "error C2065: 'OCR_NORMAL' : undeclared identifier". I have included windows.h and I even tried to include winuser.h but I still get the error. I can't seem to figure out what's wrong so any help is appreciated. Juha
Advertisement
Is OCR_NORMAL defined in winuser.h? And does it have any preprocessor blocks around it checking for e.g. the SDK version?

I don't have a compiler capable of building Win32 code here so I can't check...
You need to #define OEMRESOURCE before including winuser.h
Marcus SpeightIf at first you don't succeed.
Destroy all evidence that you tried.
Ok, I got it working. I had to add OEMRESOURCE as a global project define to make it work.

This topic is closed to new replies.

Advertisement