The methods listed below are used to draw, redraw, and clear window areas.
>>-aBaseDialog~DrawButton(--id--)-----------------------------><
The DrawButton method draws the given button.
The only argument is:
The ID of the button
+-0--------+ >>-aBaseDialog~RedrawRect(--+------+--,--left--,--top--,--right--,--bottom--,--+----------+--)->< +-hwnd-+ +-erasebkg-+
The RedrawRect method immediately redraws a rectangle within the client area of a dialog. You can specify whether the background of the dialog is to be erased before redrawing.
The arguments are:
The handle to the dialog in which parts of the client area are to be redrawn. See Get or GetItem for information on how to get a window handle. If you omit this argument, the handle of the dialog instance is used.
The upper left corner of the rectangle relative to the client area, in screen pixels.
The lower right corner of the rectangle relative to the client area, in screen pixels.
If this argument is 1 or 0, the background of the dialog is erased before redrawing. The default is 0.
Redrawing was successful.
Redrawing failed.
>>-aBaseDialog~RedrawButton(--id--+-------------+--)---------->< +-,--erasebkg-+
The RedrawButton method redraws the given button.
The arguments are:
The ID of the button
Determines whether (1) or not (0) the background of the drawing area should be erased before redrawing. The default is 0.
>>-aBaseDialog~RedrawWindowRect--+-----------------------------+-->< +-(--hwnd--+-------------+--)-+ +-,--erasebkg-+
The RedrawWindowRect method redraws the given window rectangle.
The arguments are:
>>-aBaseDialog~ClearRect(--hwnd--,--left--,--top--,--right--,--bottom--)--><
The ClearRect method clears the given rectangle of a window. The values are in pixels.
The arguments are:
The handle of the window. See GetSelf or GetItem for information on obtaining a window handle.
The horizontal value of the upper-left corner of the rectangle
The vertical value of the upper left corner
The horizontal value of the lower right corner
The vertical value of the lower right corner
The following example clears a rectangle of the size 20 by 20:
hwnd=MyDialog~GetSelf MyDialog~ClearRect(hwnd, 2, 4, 22, 24)
>>-aBaseDialog~ClearButtonRect(--id--)------------------------><
The ClearButtonRect method erases the draw area of the given button.
The only argument is:
The ID of the push button
>>-aBaseDialog~ClearWindowRect(--hwnd--)----------------------><
The ClearWindowRect method erases the draw area of the given window.
The only argument is:
The following example gets the window handle of a dialog control with resource ID of 211 and then clears the dialog control window:
hwnd = MyDialog~GetItem(211) MyDialog~ClearWindowRect(hwnd)