#include ResBitmap::ResBitmap(const String &strBitmapName) : ResData(strBitmapName,ResType::RtBitmap), mpBitmapData(0), mStrBitmapName(strBitmapName) { if(!isOkay())return; (BitmapInfo&)*this=*((BITMAPINFO*)(unsigned char*)(ResData&)*this); (PurePalette&)*this=*((BITMAPINFO*)(unsigned char*)(ResData&)*this); mpBitmapData=(unsigned char*)((ResData&)*this)+sizeof(BITMAPINFOHEADER)+(sizeof(RGBQUAD)*colorImportant()); } ResBitmap::ResBitmap(const String &strBitmapName,HMODULE hResModule) : ResData(strBitmapName,ResType::RtBitmap,hResModule), mpBitmapData(0), mStrBitmapName(strBitmapName) { if(!isOkay())return; (BitmapInfo&)*this=*((BITMAPINFO*)(unsigned char*)(ResData&)*this); (PurePalette&)*this=*((BITMAPINFO*)(unsigned char*)(ResData&)*this); mpBitmapData=(unsigned char*)((ResData&)*this)+sizeof(BITMAPINFOHEADER)+(sizeof(RGBQUAD)*colorImportant()); }