|
-
Mar 2nd, 2002, 05:35 PM
#1
Thread Starter
Member
DC & Getpixel issues... :/
I grabbed the hwnd...
I got the window's DC...
and now when i try to grab a pixel from the window it always fails and rets -1.
I can't figure out why. but i did figure out that if the cursor is in the client area or passes through the client area and then i use the getpixel function it suceeds. I dont know how to get this to work. any suggestion... here is my code...
Dim HDC As Long, LCOLOR As Long
Dim aim As AIM_Windows
Dim aimXY As POINTAPI
aim = getAimWindows()
'
HDC = GetDC(aim.BuddyList)
aimXY.x = 1000
aimXY.y = 200
'Call PostMessage(aim.BuddyList, WM_MOUSEFIRST, WM_LBUTTONDOWN, 0)
LCOLOR = GetPixel(HDC, 19, 41)
Call ReleaseDC(aim.BuddyList, HDC)
If LCOLOR <> -1 Then frmMain.BackColor = LCOLOR
frmMain.Caption = LCOLOR
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|