CommandBars Articles and Tutorials

Special\Reserved Control IDs

Author: Mike Palmatier
Platform: Visual Basic 6.0

Using an ID of 35000 in a MDI application for a menu item will automatically add a menu item for up to 9 open documents. Clicking on one of the menu items will cause the document to come into focus.

Using an ID of 35001 for a button or menu item will cause the CommandBars Customization dialog to be displayed so that the toolbars and menu bar can be customized by the user.

Using an ID of 35002 for a menu item will automatically display a list of valid workspace actions that can be performed when using the TabWorkspace in a MDI application.

Using an ID of 59392 for a menu item will automatically display a list of all the toolbars so that they can be hidden or shown.

Below is how you would declare some constants for the reserved values.

Const XTP_ID_WINDOWLIST        = 35000
Const XTP_ID_CUSTOMIZE         = 35001
Const XTP_ID_WORKSPACE_ACTIONS = 35002
Const XTP_ID_TOOLBARLIST       = 59392