PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → tooltip display or general text on screen.
tooltip display or general text on screen.
Débuté par Mike, 21 oct. 2006 10:26 - Aucune réponse
Posté le 21 octobre 2006 - 10:26
I'm new to windev and trying to get a few functions going. I want to check the color of a pixel on screen. Not in a control box or image, but the whole screen regardless of what window is there or maybe another program is running fullscreen even. In short, I don't care what program is running, but all the functions seemed to need me to specify a window handle.

After a lot of work I got the following working:

FUNCTION GetPixel(X, Y)
WDC is int = CallDLL32("user32", "GetWindowDC" ,0)
PixelColor is int = CallDLL32("gdi32", "GetPixel" , WDC, X, Y)
RESULT PixelColor

I am then using something like this to test:
result is int = getpixel(10,10)
info(result)

but what I want to do is to display this result (or any other text) on the screen at a x/y point of my choosing. Not in a control box or anything. I used other languages before which let me overlay a tooltip for example on the screen at an x/y point. But they were always pre-defined functions in the language. So how can I do something like that is Windev?
Then I could add something like getting the cursor position, and looping things and have it display somewhere on screen the color under the mouse for instance.