AddCommandToCmdBar()

Examples


The AddCommandToCmdBar() function is used to add a command to a toolbar to Microsoft Dynamics GP.

Syntax

AddCommandBar(ParentDictID, ParentFormID, ParentCmdID, Sequence, CmdDictID, CmdFormID, CmdID, CloneCmd, LoadMode)

Parameters

ParentDictID – The ID of the dictionary that contains the command list that is used for the toolbar.

ParentFormID – The resource ID of the command form that contains the definition of the command list that is used for the toolbar.

ParentCmdID – The resource ID of the command list that is used for the toolbar.

Sequence – An integer variable that can be used to specify the position of the item in the toolbar. The value 0 specifies the command will be added to the end of the toolbar. The actual position of the command will be returned after the command is added.

CmdDictID – The ID of the dictionary that contains the command you are adding.

CmdFormID – The resource ID of the command form that contains the definition of the command you are adding.

CmdID – The resource ID of the command you adding.

CloneCmd – A boolean parameter. The value true specifies that the command will be added for all users, while the value false specifies that the command will be added for only the current user.

LoadMode – An integer that specifies where the command will be added. The value corresponds to one of the following constants:

[spacer]

Constant

Description

MENULOAD_TOTABLE

The toolbar items are being added to the default toolbar set in Microsoft Dynamics GP.

MENULOAD_TOMEMORY

This value is not currently used.


Return value

An integer indicating whether the command was added to the toolbar. The value corresponds to one of the following constants:

[spacer]

Constant

Description

OKAY

The command was successfully added.

DUPLICATE

The command was not added because it already exists.



Documentation Feedback