PDA

View Full Version : AUX_REBImageRec* from resource bitmap



paradoxresolved
04-25-2007, 12:05 PM
I am currently using the following function to load bitmaps from file into AUX_RGBImageRec pointers. I'd like to be able to load them from resources however. How would I do this?


AUX_RGBImageRec* GraphicsEngineDlg::LoadBMP(char* Filename)
{
FILE* File=NULL;

if (!Filename)
{
return NULL;
}

File=fopen(Filename,"r");

if (File)
{
fclose(File);
return auxDIBImageLoad(Filename);
}

return NULL;
}
. . . Pseudocode example of what I want to do. . .
AUX_RGBImageRec* GraphicsEngineDlg::LoadBMP(UINT BITMAP_IDB)
{
// code here
}

paradoxresolved
04-27-2007, 04:56 AM
I found the solution to my problem . . . NeHe's lesson 38.