I am trying to implement a screen color picker. I think the attached image is a better explanation of what I want do achieve than a bunch of words. I'm thinking of something similar to what Spy used to pick a window to spy on.
The following attempt failed so miserably that I hardly dare to post the code:
Clicking on the button in question and holding down the mouse key results in some kind of "machine gun" sound, indicating that the assertion you can see gets fired repeatedly and Windows tries to play the assertion sound but but doesn't get far with that until I release the button. (That's not the real problem here, but why doesn't the app get blocked once the assertion fails for the first time? )
Picking colors from my own button is of course really boring, but I tried that as a first test, and not even that works. And I'm uncertain about the concept of the color picker in general: It would certainly be terribly inefficient to bitblt the entire screen to my own bitmap just to pick a single pixel on every mouse move. But capturing the screen only once in the MouseDown handler and then keep using that bitmap would lead to missing every screen change that happens while I hold the button...
Yes, lots of open questions here...
I'd appreciate any help. TIA
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.