Navigation:  ThinBASIC Modules > UI (User Interface) > Additional Controls and Functions > Canvas Control >

Canvas_Attach

Previous pageReturn to chapter overviewNext page

 

Description

 

Select the canvas target (window, control) on which future drawing operations will take place

 

Syntax

 

n = Canvas_Attach(hWnd, CtrlID, [, Redraw])

 

Returns

 

Number

 

Parameters

 

Name

Type

Optional

Meaning

hWnd

Number

No

Handle of the Canvas Window, Window, or Bitmap to be used with  statements.

CtrlID

Number

No

The control id, if the target is a Canvas Control, or zero if the target is a Canvas Window or Bitmap

Redraw

Number

Yes

%TRUE or %FALSE

 

This option can provide a great improvement in the execution speed of Canvas statements, as it eliminates repetitive updates to the display.

 

If this option is set to %TRUE, all drawing statements are buffered until a Canvas_Redraw statement is executed, or the operating system chooses to update the target window.

 

If this option is missed or set to %FALSE, all graphical statements are performed immediately.

 

Remarks

 

Restrictions

 

See also

 

Examples