In engineering, bitmaps, cursors, menu and other resources can be read with related functions. For general apart, resources can be read as follows:
Hinstance hinst = afxgetresourcehandle ();
HRSRC HRSRC = :: FindResource (hinst,
MakeintResource (IDR_MB), // Resource ID
"MB" // resource type
);
IF (! hrsrc)
Return False;
// load resource Into Memory
DWORD LEN = SizeOfResource (Hinst, HRSRC); // Resource Size
Byte * lprsrc = (byte *) loadResource (hinst, hrsrc); // read resources into memory and get the first address pointer
IF (! lprsrc)
Return False;