You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
In my haste, I wasn't too clear. You have to look at Valdes' program (the 6th post this thread):
Code:
#COMPILE EXE
#CONSOLE OFF
#DIM ALL
#INCLUDE "WIN32API.INC"
GLOBAL hvin AS LONG
FUNCTION PBMAIN () AS LONG
DIM MousePoint AS POINTAPI
LOCAL hWin AS LONG
GRAPHIC WINDOW "Cursor Position",0,0,800,600 TO hwin
GRAPHIC ATTACH hWin, 0, REDRAW
hvin=1
DO
SLEEP 20
IF hvin=0 THEN EXIT LOOP
GRAPHIC GET DC TO hvin
GetCursorPos Mousepoint
ScreenToClient hWin,mousepoint
GRAPHIC SET POS (20,20)
GRAPHIC PRINT "X: ";Mousepoint.x;" Y: ";Mousepoint.y;" "
GRAPHIC REDRAW
LOOP
GRAPHIC WINDOW END
END FUNCTION
(in order to translate the cursor point to a different coordinate system, say)
both numbers printed will be near 2^32, not negative (assuming the cursor is inside "Cursor Position" window).
Last edited by Michael Mattias; 6 Oct 2015, 03:47 PM.
Reason: Add code tags.
(I already submitted this to PB but I am not holding my breath).
WHAT IF... one of the options after gathering up all the #INCLUDE files was,"Create Single-File source code file?"
Might be a really cool debugging tool, as it would give you ONE file with everything the compiler sees in the order it sees it. Should be a heck of a lot easier to find all those "duplicate definition" or "parameter mismatch" errors, huh?
Maybe add it as a context menu item when you have the files list control filled?
Hey, the source code is there, anyone could do it.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment