void DDBPixelBits(HWND hWnd, HBITMAP hBmp) { int nSize; nSize = GetBitmapBits(hBmp, 0, NULL); BYTE *pPixelArray = new BYTE[nSize]; if (pPixelArray) { GetBitmapBits(hBmp, nSize, pPixelArray); delete [] pBuffer; } }You may still have to bugger about a bit with the conversion but getting at the pixel array should give you most of the information required.