










|
Drawing
 Drawing in a desktop window
You can download the application from here.
- Make a new ‘Window application’
- De-select the window template's ‘Auto-redraw’ flag
- Press the menu button over the window's ResEd representation (to popup the edit menu)
- Select the “Other properties” entry (to open an edit dialogue box)
- De-select the ‘Auto-redraw’ flag
- Set the work-area origin
Selecting the Extent... menu entry opens the extent dialogue box. To set the work-area origin to the centre of the window change the lower left-hand and upper right-hand coordinates to (-640,512) and (640,512) respectively.
- Insert a (Wimp) redraw event handler
- Amend the code to
DEF PROCDealWith_WindowRedraw(object,xo%,yo%)
LOCAL radius : radius=400
CIRCLE FILL xo%,yo%,radius
ENDPROC
|
N.B. When this event-handler is called, the coordinates of the current position of the work-area origin are specified by (xo%,yo%)
|