BMP -> HBITMAP
Code:
HBITMAP hImage=NULL;
char sImage[256]={0};
sprintf(sImage,".\\Images\\MyBitmap.bmp");
hImage=(HBITMAP)LoadImage(hInstance, sImage, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); //load from file
//or if included in the exe as a resource
hImage=(HBITMAP)LoadImage(hInstance, MAKEINTRESOURCE(ID_MYBITMAP) , IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR ); //load resource
if(!hImage)//error
iError=GetLastError();
>>Dang, I wish I could still have access to physical pixel array.
Looked at GetDIBits() ?
or load with LR_CREATEDIBSECTION