I'm trying to access the pixel colors from a image file but can't seem to get it to work properly, my program is only accessing the pixel colors from my active window. I've been stuck on this for a few days and would really appreciate any help. I'm guessing i haven't set a proper handle to a device context to the image but i don't know how to do this HWND hDesktopWnd; HDC hDesktopDC; HDC hCaptureDC; HBITMAP hCaptureBitmap; BITMAPINFO bmi = {0}; RGBQUAD *pPixels; LPTSTR szFileName; BITMAP bm; int nScreenWidth, nScreenHeight; szFileName = "test.bmp"; nScreenWidth = GetSystemMetrics(SM_CXSCREEN); nScreenHeight = GetSystemMetrics(SM_CYSCREEN); …

Member Avatar
Member Avatar
+0 forum 2

The End.