Originally posted by Gerald Sutherland
Of course the latter point was also in my mind, too.
cheers.. aSa C[_]
#COMPILE EXE #DIM ALL ' PBWin 9.00.0085 ! %IDC_GRAPHIC_VIEW = 5000 GLOBAL grafsize_x,grafsize_y AS LONG _____________________________________________________________________________________________ FUNCTION PBMAIN () AS LONG LOCAL hDLG,desksize_x,desksize_y AS LONG LOCAL x1,y1,x2,y2,z AS SINGLE DESKTOP GET CLIENT TO desksize_x,desksize_y grafsize_x = desksize_x * 0.7: grafsize_y = desksize_y * 0.7 DIALOG NEW PIXELS, 0, "testing", , , grafsize_x, grafsize_y, %WS_CAPTION OR %WS_SYSMENU, 0 TO hDLG CONTROL ADD GRAPHIC, hDLG, %IDC_GRAPHIC_VIEW, "", 0, 0, grafsize_x, grafsize_y GRAPHIC ATTACH hDLG, %IDC_GRAPHIC_VIEW GRAPHIC CLEAR %BLACK ' these needs to be 0's here x1 = 0 y1 = 0 ' add or decrease one or both grafsizes "fixes" axis reversal x2 = grafsize_x '+1 y2 = grafsize_y '+1 ' x axis reversal !! GRAPHIC SCALE (x2,y1) - (x1,y2) DIALOG SHOW MODAL hDLG, CALL ShowGraphicsProc END FUNCTION _____________________________________________________________________________________________ CALLBACK FUNCTION ShowGraphicsProc() AS LONG SELECT CASE CBMSG CASE %WM_INITDIALOG ' in standard (=unreversed x axis) coordinate system result of this point to the right GRAPHIC LINE (grafsize_x*0.1,grafsize_y*0.2) - (grafsize_x*0.8,grafsize_y*0.35), %RED GRAPHIC LINE STEP - (grafsize_x*0.4,grafsize_y*0.7), %RED CASE %WM_COMMAND SELECT CASE CBCTL CASE %IDCANCEL IF CBCTLMSG = %BN_CLICKED THEN DIALOG END CBHNDL END IF END SELECT END SELECT END FUNCTION
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.
Leave a comment: