VLMenuPlus Reference

MethodRegisterWindowMenu

See Also See Also Applies To Applies To

This function registers child windows for processing their context menus. Please note that VLMenuHelper may not be able to process context menu of certain types of child window control.

 

Syntax

object.RegisterWindowMenu(ByVal hWnd As Long, [ByRef bStop As Boolean])

 

The RegisterWindowMenu method syntax has these parts:

Part Description
object An object expression that evaluates to an object of VLMenuPlus type.
hWnd Handle of the child window.
bStop (Default False) To de-register a child window control, method should be called with bStop = True.

The child window controls and forms will automatically get deregistered when they are destroyed or unloaded.

Remark

If VLMenuPlus control is placed on an MDI form, all the MDI child forms will automatically get registered.  On the other hand, if the control is placed on an MDIChild form, the siblings will have to be explicitly registered for their menu display processing.

For MDI applications, it is adviced that VLMenuPlus be put on the MDI form. Even in SDI applications it is adviced that the control be put only on the main form of your application. In all other forms use this method to provide bitmap and help message support.

For processing context menus of any form or a child control, you must explicitly register it with VLMenuPlus control using RegisterWindowMenu method.

 

Note

Using multiple VLMenuPlus controls in a single application can cause unpredictable results.