I have created a DC using CreateCompatibleDC and attached an HBITMAP created using CreateCompatibleBitmap(). Everything works fine with windows api's. I have tryed using GetObject(HBITMAP, ..., &BITMAP), The BITMAP.bmBits is alway's NULL
.
Anyone know how to get a pointer to the starting bits of a HBITMAP?Code:temp = GetObject(hbit, 0, NULL); bmp = (BITMAP *)malloc(temp); GetObject(hbit, temp, bmp); lptr = (long *)bmp->bmBits; if(lptr == NULL){MessageBox(hwnd, "it is NULL", "nothing", 0);}




. I have tryed using GetObject(HBITMAP, ..., &BITMAP), The BITMAP.bmBits is alway's NULL
.
Reply With Quote