Search
Box.BindToControl Method
See Also
 



( a feature of FlowChartX Pro edition)

Binds a Windows control or a VB control to this box.

 Syntax

VB6  Copy Code

Public Sub BindToControl( _
    ByVal ctrl As Object, _
    ByVal hwnd As Long _
)

C++  Copy Code

public:
void BindToControl (
    IDispatch* ctrl,
    unsigned int hwnd
)

 Parameters

ctrl
An IDispatch pointer to a VB control.
hwnd
A handle to window / UI control.

 Remarks

Binds a box to the window specified via hwnd. You must create the window before invoking this method. Use either the standard window creation APIs, or the VB Load method to create a new member of a control array. The ctl parameter may be initialized with an IDispatch pointer to a VB control. If it is not null, the Width and Height extended properties of a VB control are set when the bound box is resized. That is needed because some VB controls don't respond to the WM_SIZE message to update their painting area size, but rely solely on the values of the aforementioned properties.

 Example

Here a VB control array is used to create the window. The window handle is set to 0, since FlowChartX can query it from the passed IDispatch pointer:

VB6  Copy Code

Load cmd(1)

Set cmd(1).Container = fcx
cmd(1).Visible = True

fcx.ActiveBox.BindToControl cmd(1), 0

 See Also