Page 2 of 2

Re: GetPixelColour with mouse magnifier

Posted: Sun Nov 29, 2009 4:35 am
by Demivec
Very nice Infratec. 8)

I have one small feature request. To be able to enlarge the magnification window, perhaps by some set sizes or using keypresses like Control + '+' (i.e. increases window size by some increment or selects next set size).

Re: GetPixelColour with mouse magnifier

Posted: Sun Nov 29, 2009 2:23 pm
by infratec
Hi,

I added keyboard shortcuts for the magnification and a small help with 'F1'

Bernd

Re: GetPixelColour with mouse magnifier

Posted: Mon Nov 30, 2009 11:49 am
by infratec
Hi,

now I had the chance to test it with Win 7, and it failed :!:

After start, it was working for ~30s than it shows only FFFFFF as colour.

Solution:

I put the GetDC() and ReleaseDC() functions inside the main loop.
Now it is also working with win 7. :mrgreen:

Have I already told that I don't like windows ?

Bernd

P.S.:
But you have to change the default settings for the taskbar when you want to see the titles.

Re: GetPixelColour with mouse magnifier

Posted: Mon Nov 30, 2009 7:09 pm
by infratec
An other version:

In my office I detected that the program was not working with a 2 monitor solution.
I hope this is fixed now too.

Bernd

Re: GetPixelColour with mouse magnifier

Posted: Wed Dec 02, 2009 8:28 am
by infratec
Hi,

since there was still a problem with multi screen scenarios,
I had to use again a windows API function.

Now it should work.

Bernd

Re: GetPixelColour with mouse magnifier

Posted: Wed Dec 02, 2009 4:11 pm
by infratec
Again me,

yes, the cursor mouse movement was not 100% accurate.
Sometimes one press was lost.

This depends on mouse_event_(). With relative moves it uses the mouse driver
and his acceleration function and that stuff.
So I decided to use the absolute setting of the position.
I also switched from mouse_event_() to SendInput_(), since mouse and
keyboard_event are marked as deprecated.

So it is also a good example for mouse control with SendInput_()

Bernd