GetActiveWindow

I'm writing code for which I'm using the GetActiveWindow function to get the DC of an external window for pixel testing. It works well, however, it doesn't seem to get the pixel location relative to the window, but rather, relative to the desktop. If I am reading from location 10, 10 for example,

WindowHandle = GetActiveWindow
WindowDC = GetDC(WindowHandle)
GetPixel(WindowDC, 10, 10)

I should expect to always read from location 10, 10 of the window, no matter where I move it but instead I'm reading from location 10, 10 of the screen, which is always fixed. This means I have to keep the window in one place. Does anyone know what I'm doing wrong?
[718 byte] By [cesarsalad] at [2007-11-18 22:16:30]
# 1 Re: GetActiveWindow
Check out the following thread. There are a variety of attachments and plenty of discussion dealing with this very topic.

http://www.dev-archive.com/forum/showthread.php?t=299754
WizBang at 2007-11-9 23:00:37 >