|
-
Oct 14th, 2000, 12:53 AM
#1
I made an app that returns the RGB values of the pixel the mouse is over, but it only does this when the mouse is in the window itself, it wont do it on like the desktop. Why?
-
Oct 14th, 2000, 08:41 AM
#2
First you must use WindowFromPoint API to get the hWnd the window is over. Then from there, use GetWindowDC t get the DC and then use GetPixel to get the colour.
-
Oct 14th, 2000, 09:07 AM
#3
transcendental analytic
OR directly use GetDesktopWindow and get the ´DC with GetDC
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 14th, 2000, 01:05 PM
#4
Ok i got it working now, but for some reason the edit boxes that show the values to the user blink alot, and the box contaning blue value doesnt even update itself, but the others do. Any ideas?
-
Oct 14th, 2000, 01:42 PM
#5
Now im really frustrated, i found a way around that problem, but now for some reason it wont update itself when its outside of the dialog. I have a start button. You press it and it turns to a stop button and it starts showing the values. If you move the cursor off the dialog, it stops. But while off the dialog, if you press the spacebar and trigger the stop button, it will show the values of the color of the pixel the mouse is resting over (outside the dialog). Again, any ideas?
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
|