
Cheers
Sergio
#COMPILER PBWIN 9 #COMPILE EXE #DIM ALL GLOBAL hDlg AS DWORD GLOBAL grfId AS LONG SUB DrawFrame() LOCAL hFnt, w, h AS LONG CONTROL GET CLIENT hDlg, grfId TO w, h GRAPHIC ATTACH hDlg, grfId, REDRAW GRAPHIC CLEAR %WHITE GRAPHIC SCALE (0, h) - (w, 0) ' GRAPHIC SCALE (0, h-1) - (w-1, 0) ' this works fine... FONT NEW "Arial",18, 1 TO hFnt GRAPHIC SET FONT hFnt GRAPHIC LINE (10, 10) - (w*0.9, 10), %RED GRAPHIC LINE (10, 10) - (10, h*0.9), %RED GRAPHIC LINE (10, 10) - (w*0.9, h*0.9), %BLUE GRAPHIC COLOR %BLACK, %WHITE GRAPHIC SET POS (10,h*0.9) GRAPHIC PRINT "UP" GRAPHIC REDRAW END SUB '------------------------------------------------------------------ CALLBACK FUNCTION DlgProc () AS LONG SELECT CASE CB.MSG CASE %WM_INITDIALOG CASE %WM_COMMAND IF CB.CTLMSG = %BN_CLICKED THEN SELECT CASE CB.CTL CASE %IDCANCEL DIALOG END CB.HNDL END SELECT END IF END SELECT END FUNCTION '------------------------------------------------------------------ FUNCTION PBMAIN () AS LONG LOCAL w, h AS LONG w = 500 h = 500 DIALOG NEW PIXELS, 0, "Graphic test",,, w, h, %WS_CAPTION OR %WS_SYSMENU, 0 TO hDlg CONTROL ADD GRAPHIC, hDlg, grfId, "", 0, 0, w, h DrawFrame DIALOG SHOW MODAL hDlg, CALL DlgProc 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: