Hi All,
I've been experimenting with including my media as resources and had some success but now I'm stuck. I've created the resource.h and resource.rc files ok and added then into the solution. The solution compiles cleanly with no warnings or errors. But when I try to use the LoadResource() API call it can't find any of the compiled-in resources. I used the same code in a non-DarkGDK project and it works exactly as it should. Has anyone tried doing this and had any success or am I going to have to give it up?
resource.h
#define IDB_TROGG 1000
#define IDS_ZAP 1100
resource.rc
IDB_TROGG PNG "Trogg.png"
IDS_ZAP WAVE "zap.wav"
TestRes.cpp
...
HRSRC hResInfo;
hResInfo = FindResource(GetModuleHandle(0),MAKEINTRESOURCE(IDB_TROGG),"PNG");
if (hResInfo==NULL)
MessageBox(0,"FindResource failed for PNG","Error",MB_OK);
hResInfo = FindResource(GetModuleHandle(0),MAKEINTRESOURCE(IDS_ZAP),"WAVE");
if (hResInfo==NULL)
MessageBox(0,"FindResource failed for WAVE","Error",MB_OK);
...
There are only 10 types of people in the world.
Those who understand binary, and those who don't.