int CanvasUpdate (int panelHandle, int controlID, Rect updateArea);
Immediately updates on the screen the contents of the canvas control within a specific rectangular area.
The canvas control maintains an internal bitmap reflecting all of the drawing operations, except for drawing operations made while the ATTR_DRAW_POLICY attribute is VAL_DIRECT_TO_SCREEN. Maintaining the internal bitmap ensures that the canvas is redrawn correctly when it is exposed.
CanvasUpdate copies the content of the rectangular area in the internal bitmap to the canvas control.
Input | ||
Name | Type | Description |
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel. |
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl. |
updateArea | Rect | Rect structure specifying the location and size of the rectangular to
update from the internal bitmap. Use VAL_ENTIRE_OBJECT to specify the
entire canvas control. The Rect structure is defined as follows: typedef struct { int top; int left; int height; int width; } Rect; You can create a Rect without having to declare a variable by using the following function: Rect MakeRect (int top, int left, int height, int width); ExampleCanvasUpdate (panelHandle, controlID, VAL_ENTIRE_OBJECT); |
Name | Type | Description | ||||
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|