From: Big T. <big...@gm...> - 2009-10-20 13:20:49
|
Here it is: BITMAP bm; pMask = 0; pHandle = (HBITMAP)LoadImage(NULL, (const char*)platformPath, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); if (!pHandle) return false; if (GetObject(pHandle, sizeof(bm), &bm)) { width = bm.bmWidth; height = bm.bmHeight; return true; } else { return false; } By the way, why is platformPath a void* ? I have expected a const char* (i.e, a POSIX path). In this case, additional code would be required on OSX (I think, CFURLCreateFromFileSystemRepresentation). 'Tick |