*Hello All, I try to get a pixel color according to x,y pixel coordinates using this code, but it doesn't work.*
>>> import win32ui >>> w = win32ui.FindWindow(None, "11") >>> dc = w.GetWindowDC() >>> color = dc.GetPixel(100,100) Traceback (most recent call last): File "<interactive input>", line 1, in <module> win32ui: GetPixel failed *I can do it in VC++ like this:* COLORREF GetColor(HWND hWnd, int x, int y) { COLORREF color; HDC hDC = NULL; hDC = GetDC(hWnd); color = GetPixel(hDC, x, y); ReleaseDC(hWnd, hDC); return color; } *bye the way. Where is the** GetPixel(hDC, x, y) like win32SDK in pythonwin? *
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32