Functions
MenuBar Item

Functions

RawItemHdrmdlDialog_menuBarGetCmdWinP (void)
 Gets a pointer to the RawItemHdr of the Command Window Menu Bar. More...
 
DItem_PulldownMenumdlDialog_menuBarFindAppMenu (RawItemHdr **menuBarPP)
 Gets the pointer to the applications menu. More...
 
DItem_PulldownMenumdlDialog_menuBarAddAppMenu (RawItemHdr *menuBarP)
 Adds the Applications menu to the Command Window Menu Bar, or to another Menu Bar if specified. More...
 
StatusInt mdlDialog_menuBarAddCmdWinMenu (DItem_PulldownMenuItem *menuItemP, long menuId, bool insertAlphabetically)
 Adds a Pull-Down menu to the Command Window Menu Bar. More...
 
StatusInt mdlDialog_menuBarDeleteCmdWinMenu (DItem_PulldownMenuItem *menuItemP)
 Removes a Pull-Down menu from the Command Window. More...
 
StatusInt mdlDialog_menuBarRegister (DItem_PulldownMenuItem *newMenuItemP, long menuBarId, WCharCP appName, bool disableMicroStation, bool setCmdWindowTitle)
 Creates a Menu Bar item from resource information The newly created menu appears as a selection on the applications menu. More...
 
StatusInt mdlDialog_menuBarActivate (DItem_PulldownMenuItem *menuItemP, WCharCP taskIdP, long menuBarId, bool override, bool disableMicroStation, bool setCmdWindowTitle)
 Makes a Menu Bar active in the command window. More...
 
StatusInt mdlDialog_menuBarSetDefault (DItem_PulldownMenuItem *menuItemP, WCharCP taskIdP, long menuBarId)
 Sets MicroStation's default Command Window Menu Bar from among the choices on the applications menu. More...
 
StatusInt mdlDialog_menuBarUnloadAppItem (DItem_PulldownMenuItem *menuItemP)
 Unloads from memory the specified application menu item and Menu Bar. More...
 
StatusInt mdlDialog_menuBarUnloadApp (DItem_PulldownMenuItem *menuItemP, WCharCP taskIdP, long menuBarId)
 Removes an applications menu item and the associated Menu Bar. More...
 
StatusInt mdlDialog_menuBarFindItem (DItem_PulldownMenuItem *menuItemP, DItem_PulldownMenu **menuPP, RawItemHdr *mbarP, UInt32 menuType, long menuId, long searchId)
 Finds, within a specified Pull-Down menu, the menu item whose search ID is searchId. More...
 
StatusInt mdlDialog_menuBarFindItemByAccelerator (DItem_PulldownMenuItem *menuItemP, DItem_PulldownMenu **menuPP, RawItemHdr *mbarP, UInt32 menuType, long menuId, long accelerator)
 Searches the specified Menu Bar for the menu item that currently has the given accelerator. More...
 
StatusInt mdlDialog_menuBarGetItem (DItem_PulldownMenuItem *menuItemP, DItem_PulldownMenu **menuPP, RawItemHdr *mbarP, UInt32 menuType, long menuId, int subItemIndex)
 Retrieves a pointer to the subItemIndexth menu item of a specified Pull-Down menu. More...
 
DItem_PulldownMenumdlDialog_menuBarFindMenu (RawItemHdr *mbarP, UInt32 menuType, long menuId)
 Returns a pointer to the Pull-Down menu whose type is menuType and ID is menuId that is contained in the Menu Bar item mbarP. More...
 
DItem_PulldownMenumdlDialog_menuBarGetMenu (RawItemHdr *mbarP, int menuIndex)
 Returns a pointer to the Pull-Down menu at the menuIndex position within the Menu Bar item mbarP. More...
 
int mdlDialog_menuBarGetNMenus (RawItemHdr *mbarP)
 Returns the number of Pull-Down menus contained within the Menu Bar item specified by mbarP. More...
 
int mdlDialog_menuBarGetNItems (DItem_PulldownMenu **menuPP, RawItemHdr *mbarP, UInt32 menuType, long menuId)
 Returns the number of menu items contained within a specified Pull-Down menu. More...
 
StatusInt mdlDialog_menuBarGetSelection (UInt32 *menuTypeP, long *menuIdP, int *subItemIndexP, long *searchIdP, RawItemHdr *mbarP)
 Retrieves information about the last menu item that was selected by the user from the Menu Bar item specified by mbarP. More...
 
StatusInt mdlDialog_menuBarDeleteAllMenus (RawItemHdr *mbarP)
 Removes all Pull-Down menus from the Menu Bar item specified by mbarP. More...
 
StatusInt mdlDialog_menuBarDeleteMenu (DItem_PulldownMenu *menuP, RawItemHdr *mbarP, UInt32 menuType, long menuId)
 Deletes the specified Pull-Down menu from the Menu Bar item specified by mbarP. More...
 
StatusInt mdlDialog_menuBarInsertMenu (RawItemHdr *mbarP, UInt32 menuType, long menuId, DItem_PulldownMenu *beforeMenuP)
 Inserts the Pull-Down menu whose resource type is menuType and ID is menuId into the Menu Bar item specified by mbarP. More...
 
DItem_PulldownMenumdlDialog_menuBarInsMenu (RawItemHdr *mbarP, UInt32 menuType, long menuId, DItem_PulldownMenu *beforeMenuP)
 Inserts the Pull-Down menu whose resource type is menuType and ID is menuId into the Menu Bar item specified by mbarP. More...
 
DItem_PulldownMenumdlDialog_menuBarInsMenuEx (RawItemHdr *mbRiP, UInt32 menuType, long menuId, DItem_PulldownMenu *beforeMenuP, MdlDesc *ownerMD)
 Inserts the Pull-Down menu whose resource type is menuType and ID is menuId into the Menu Bar item specified by mbarP. More...
 
StatusInt mdlDialog_menuBarDetachMenu (DItem_PulldownMenu *menuP, RawItemHdr *mbarP, UInt32 menuType, long menuId, bool redraw)
 Removes a Pull-Down menu from a Menu Bar. More...
 
DItem_PulldownMenumdlDialog_menuBarAttachMenu (RawItemHdr *mbarP, DItem_PulldownMenu *menuP, DItem_PulldownMenu *beforeMenuP)
 Adds a Pull-Down menu to any Menu Bar. More...
 
StatusInt mdlDialog_menuBarDeleteItem (DItem_PulldownMenuItem *menuItemP)
 Deletes the Pull-Down menu item specified by menuItemP. More...
 
StatusInt mdlDialog_menuBarDeleteAllItems (DItem_PulldownMenu *menuP)
 Deletes all the pull- down menu items from the Pull-Down menu specified by menuP. More...
 
StatusInt mdlDialog_menuBarMenuGetTitle (WCharCP *titlePP, DItem_PulldownMenu *menuP)
 Retrieves a pointer to the title of the Pull-Down menu specified by menuP. More...
 
void mdlDialog_menuBarMenuSetTitle (DItem_PulldownMenu *menuP, WCharCP titleP)
 Sets the title of the pull- down menu specified by menuP to be the string pointed to by titleP. More...
 
StatusInt mdlDialog_menuBarMenuGetEnabled (bool *enabledP, DItem_PulldownMenu *menuP)
 Retrieves the enabled state (enabled or disabled) of the Pull-Down menu specified by menuP. More...
 
StatusInt mdlDialog_menuBarMenuSetEnabled (DItem_PulldownMenu *menuP, bool enabled)
 Sets the enabled state (enabled or disabled) of the Pull-Down menu specified by menuP to the value specified by enabled. More...
 
StatusInt mdlDialog_menuBarToggle (RawItemHdr *mbarP)
 Toggles the appearance of the specified menubar. More...
 
StatusInt mdlDialog_menuBarHasFocus (RawItemHdr *mbarP)
 Determines whether the menubar specified has the input focus. More...
 
StatusInt mdlDialog_textPDMItemSetMark (DItem_PulldownMenuItem *menuItemP, int markType)
 Sets the mark of the Text Pull-down Menu item specified by menuItemP to the value specified by markType. More...
 
DialogItemmdlDialog_menuBarFind (MSDialog *db)
 Returns a pointer to the Menu Bar of the specified MSDialog, if any. More...
 

Detailed Description

Function Documentation

StatusInt mdlDialog_menuBarActivate ( DItem_PulldownMenuItem menuItemP,
WCharCP  taskIdP,
long  menuBarId,
bool  override,
bool  disableMicroStation,
bool  setCmdWindowTitle 
)

Makes a Menu Bar active in the command window.

Parameters
[in]menuItemPindicates the menu item within the Applications Menu that corresponds to the menu to make active. If menuItemP is not available, taskIdP and menuBarId may be used instead. Pass NULL in taskId to use the current task. Pass zero in menuBarId to match the first item found.
[in]taskIdPsee menuItem
[in]menuBarIdsee menuItem
[in]overridetells whether to ignore the remaining two arguments
[in]disableMicroStationwhich indicates whether to disable the MicroStation Menu Bar
[in]setCmdWindowTitlewhich indicates whether to set the title of the Command Window to the application name.
Returns
SUCCESS, or a non-zero value on error.
DItem_PulldownMenu* mdlDialog_menuBarAddAppMenu ( RawItemHdr menuBarP)

Adds the Applications menu to the Command Window Menu Bar, or to another Menu Bar if specified.

Parameters
[out]menuBarPpoints to the RawItemHdr of the Menu Bar to which to add the Applications menu. If menuBarP is NULL, it is added to the Command Window Menu Bar.
Returns
A pointer to the Applications Pull-Down menu, or NULL if there is an error.
StatusInt mdlDialog_menuBarAddCmdWinMenu ( DItem_PulldownMenuItem menuItemP,
long  menuId,
bool  insertAlphabetically 
)

Adds a Pull-Down menu to the Command Window Menu Bar.

Parameters
[out]menuItemPpoints to the Pull-Down menu once it is added.
[in]menuIdidentifies which Pull-Down menu to add.
[in]insertAlphabeticallyindicates whether the new Pull-Down menu should be inserted in alphabetical order among the existing menus. If not, it is added to the end.
Returns
SUCCESS, or a non-zero value if there is an error.
DItem_PulldownMenu* mdlDialog_menuBarAttachMenu ( RawItemHdr mbarP,
DItem_PulldownMenu menuP,
DItem_PulldownMenu beforeMenuP 
)

Adds a Pull-Down menu to any Menu Bar.

Parameters
[in]mbarPpoints to the RawItemHdr of the Menu Bar to which to add menuP.
[in]menuPmenu to attach
[in]beforeMenuPIf beforeMenuP is specified, the new Pull-Down menu menuP is added to the Menu Bar in the position just before beforeMenuP; otherwise it is added to the end.
Returns
A pointer to the added Pull-Down menu item, or NULL if there is an error.
StatusInt mdlDialog_menuBarDeleteAllItems ( DItem_PulldownMenu menuP)

Deletes all the pull- down menu items from the Pull-Down menu specified by menuP.

A pointer to a Pull-Down menu can be obtained by calling mdlDialog_menuBarFindMenu, mdlDialog_menuBarFindItem, mdlDialog_menuBarGetItem or mdlDialog_menuBarGetNItems.

Parameters
[in]menuPmenu to remove from
Returns
SUCCESS, or a non-zero value if an error occurs. This means that menuP does not point to a Pull-Down menu.
See also
mdlDialog_menuBarFindMenu mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_menuBarGetNItems mdlDialog_menuBarDeleteItem
StatusInt mdlDialog_menuBarDeleteAllMenus ( RawItemHdr mbarP)

Removes all Pull-Down menus from the Menu Bar item specified by mbarP.

Parameters
[in]mbarPpointer to a Menu Bar
Returns
SUCCESS, or ERROR if mbarP does not point at a Menu Bar item.
See also
mdlDialog_menuBarDeleteMenu
StatusInt mdlDialog_menuBarDeleteCmdWinMenu ( DItem_PulldownMenuItem menuItemP)

Removes a Pull-Down menu from the Command Window.

Parameters
[out]menuItemPpoints to the Pull-Down menu item to be removed from the Command Window menu.
Returns
SUCCESS, or a non-zero value on error.
StatusInt mdlDialog_menuBarDeleteItem ( DItem_PulldownMenuItem menuItemP)

Deletes the Pull-Down menu item specified by menuItemP.

A pointer to a menu item is obtained by calling mdlDialog_menuBarFindItem or mdlDialog_menuBarGetItem.

Parameters
[in]menuItemPmenu item to delete
Returns
SUCCESS, or a non-zero value if an error occurs. This means that menuItemP does not point to a Pull-Down menu item.
See also
mdlDialog_menuBarFindMenu mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_menuBarGetNItems mdlDialog_menuBarDeleteAllItems
StatusInt mdlDialog_menuBarDeleteMenu ( DItem_PulldownMenu menuP,
RawItemHdr mbarP,
UInt32  menuType,
long  menuId 
)

Deletes the specified Pull-Down menu from the Menu Bar item specified by mbarP.

Remarks
The Pull-Down menu to be deleted can be specified in two ways. If a pointer to a Pull-Down menu was obtained through a call to mdlDialog_menuBarFindMenu, mdlDialog_menuBarGetItem or mdlDialog_menuBarFindItem, the menuP parameter can be set to the pointer.
Parameters
[in]menuPIf menuP is NULL, the Menu Bar item will first be searched for a menu whose type is menuType and ID is menuId. If the menu is found, it will be deleted.
[in]mbarPThe mbarP parameter must point to a Menu Bar item. It cannot be NULL.
[in]menuTypetype of menu to delete
[in]menuIdresource ID of menu to delete
Returns
SUCCESS, or a non-zero value if an error occurs or the specified menu is not found.
See also
mdlDialog_menuBarDeleteAllMenus mdlDialog_menuBarFindMenu mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem
StatusInt mdlDialog_menuBarDetachMenu ( DItem_PulldownMenu menuP,
RawItemHdr mbarP,
UInt32  menuType,
long  menuId,
bool  redraw 
)

Removes a Pull-Down menu from a Menu Bar.

Parameters
[in]menuPpoints to the Pull-Down menu item to remove. If it is NULL, the menuType and menuId parameters are used to identify the Pull-Down menu item instead.
[in]mbarPpoints to the RawItemHdr of the Menu Bar from which to delete the Pull-Down.
[in]menuTypetype of menu to delete
[in]menuIdresourceId of menu to delete
[in]redrawindicates whether the Menu Bar should be redrawn after the item is removed.
Returns
SUCCESS, or a non-zero value on error.
DialogItem* mdlDialog_menuBarFind ( MSDialog db)

Returns a pointer to the Menu Bar of the specified MSDialog, if any.

Parameters
[in]dbis a pointer to the MSDialog in question.
Returns
A pointer to the dialog's Menu Bar if there is one, or else NULL.
DItem_PulldownMenu* mdlDialog_menuBarFindAppMenu ( RawItemHdr **  menuBarPP)

Gets the pointer to the applications menu.

Parameters
[out]menuBarPPpoints to an MDL variable that will point to RawItemHdr of the Command Window Menu Bar after the function is called.
Returns
A pointer to the applications Pull-Down menu, or NULL if there is an error.
StatusInt mdlDialog_menuBarFindItem ( DItem_PulldownMenuItem menuItemP,
DItem_PulldownMenu **  menuPP,
RawItemHdr mbarP,
UInt32  menuType,
long  menuId,
long  searchId 
)

Finds, within a specified Pull-Down menu, the menu item whose search ID is searchId.

All of the functions that manipulate menu items use a pointer to DItem_PulldownMenuItem to indicate a particular menu item.

Remarks
When the number of items in a menu is changing dynamically, obtaining a pointer to a menu item by searching for its search ID is more useful than getting the nth menu item. A menu item that is the seventh item could become the fifth item if earlier items are deleted by calling mdlDialog_menuBarDeleteItem.
Parameters
[out]menuItemPIf the menu item is found, the location specified by the menuItemP parameter will be filled with information identifying the menu item. If the menu item is not found, the location will be filled with NULLs. The menuItemP parameter cannot be NULL.
[in,out]menuPPis a pointer to NULL or a NULL pointer, the Menu Bar item will first be searched for a menu whose type is menuType and ID is menuId. If menuPP was not a NULL pointer, the location pointed at by menuPP will be set to be a pointer to the menu that was found, or NULL if the menu was not found. The mbarP parameter must point to a Menu Bar item.
[in]mbarPThe mbarP parameter specifies the Menu Bar item to search.
[in]menuTypemenuPP not NULL : ignored
[in]menuIdmenuPP not NULL:ignored
[in]searchIdID of item to find
Remarks
The menu to search can be indicated in two ways. If a pointer to a menu was obtained through a call to mdlDialog_menuBarFindMenu or a previous call to mdlDialog_menuBarFindItem or mdlDialog_menuBarGetItem, the menuPP parameter can be set so that it points to the pointer. In this case, only the menu specified by menuPP will be searched for searchId. The mbarP parameter is unused and can be NULL.
The following code fragment shows how to get pointers to MicroStation's Open/Close menu and the View 8 menu item:
{
MSDialog *cmdWindDb;
DialogItem *menuBarDiP;
RawItemHdr *menuBarP;
DItem_PulldownMenuItem mbarItem;
DItem_PulldownMenu *mbarMenuP;
first get a pointer to MicroStation's Command Window
cmdWindDb=mdlDialog_find(DIALOGID_CommandWindow, NULL);
if (!cmdWindDb)
return;
now find the Menu Bar item
if (!menuBarDiP)
return;
menuBarP=menuBarDiP->rawItemP;
mbarMenuP=NULL;
if (mdlDialog_menuBarFindItem(&mbarItem, &menuBarP, menuBarP,
return;
mbarItem now contains information on the view 8 menu item *
...
}
Returns
SUCCESS, or ERROR if an error occurred or the menu item was not found.
See also
mdlDialog_menuBarGetItem
StatusInt mdlDialog_menuBarFindItemByAccelerator ( DItem_PulldownMenuItem menuItemP,
DItem_PulldownMenu **  menuPP,
RawItemHdr mbarP,
UInt32  menuType,
long  menuId,
long  accelerator 
)

Searches the specified Menu Bar for the menu item that currently has the given accelerator.

Parameters
[out]menuItemPis the found menuItem.
[in,out]menuPPis a pointer to the menu item found. Set this to NULL if you don't want the pointer returned.
[in]mbarPis a pointer to the Menu Bar to search.
[in]menuTypespecifies the menu type. This value is ignored if menuPP is NULL.
[in]menuIdspecifies the menu Id. This value is ignored if menuPP is NULL.
[in]acceleratoris the accelerator currently assigned to the menu item to be found.
Returns
SUCCESS, or ERROR if an error occurs or no menu item is found with the accelerator.
DItem_PulldownMenu* mdlDialog_menuBarFindMenu ( RawItemHdr mbarP,
UInt32  menuType,
long  menuId 
)

Returns a pointer to the Pull-Down menu whose type is menuType and ID is menuId that is contained in the Menu Bar item mbarP.

All of the functions that manipulate menus use a pointer to DItem_PulldownMenu to indicate a particular Pull-Down menu.

Parameters
[in]mbarPpointer to a Menu Bar
[in]menuTypetype of menu to find
[in]menuIdresource ID of menu to find
Returns
SUCCESS, or NULL if an error occurs or the menu is not found.
See also
mdlDialog_menuBarGetMenu
RawItemHdr* mdlDialog_menuBarGetCmdWinP ( void  )

Gets a pointer to the RawItemHdr of the Command Window Menu Bar.

Returns
A pointer the RawItemHdr of the Command Window Menu Bar, or NULL on error.
StatusInt mdlDialog_menuBarGetItem ( DItem_PulldownMenuItem menuItemP,
DItem_PulldownMenu **  menuPP,
RawItemHdr mbarP,
UInt32  menuType,
long  menuId,
int  subItemIndex 
)

Retrieves a pointer to the subItemIndexth menu item of a specified Pull-Down menu.

mdlDialog_menuBarGetItem should only be used if the number of items in the specified Pull-Down menu is not changing dynamically. Otherwise, mdlDialog_menuBarFindItem should be used instead.

Parameters
[out]menuItemPNULL of not in range
[in,out]menuPPIf menuPP is a pointer to NULL or a NULL pointer, the Menu Bar item will first be searched for a menu whose type is menuType and ID is menuId. If menuPP was not a NULL pointer, the location pointed at by menuPP will be set to be a pointer to the menu that was found, or NULL if the menu was not found. The mbarP parameter must point to a Menu Bar item.
[in]mbarPThe mbarP parameter specifies a Menu Bar item.
[in]menuTypemenuPP not NULL :ignored
[in]menuIdmenuPP not NULL: ignored
[in]subItemIndexspecifies which menu item to retrieve a pointer to. subItemIndex must be greater than or equal to 0 and less than the number of items in the specified Pull-Down menu. Use the mdlDialog_menuBarGetNItems function to determine the number of items in a Pull-Down menu. If subItemIndex is in range, the location specified by the menuItemP parameter will be filled with information identifying the appropriate menu item. If the subItemIndex is not in range, the location will be set to NULL. This menuItemP parameter can not be NULL. All of the functions that manipulate menu items use a pointer to DItem_PulldownMenuItem to indicate a particular menu item.
Remarks
The Pull-Down menu can be specified in two ways. If a pointer to a menu was obtained through a call to mdlDialog_menuBarFindMenu or a previous call to mdlDialog_menuBarGetItem or mdlDialog_menuBarFindItem , the menuPP parameter can be set so that it points to the pointer. The mbarP parameter is unused and can be NULL in this case.
Returns
SUCCESS, or non-zero value if an error occurred or subItemIndex was out of range.
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetNItems
DItem_PulldownMenu* mdlDialog_menuBarGetMenu ( RawItemHdr mbarP,
int  menuIndex 
)

Returns a pointer to the Pull-Down menu at the menuIndex position within the Menu Bar item mbarP.

All of the functions that manipulate menus use a pointer to DItem_PulldownMenu to indicate a particular Pull-Down menu.

Parameters
[in]mbarPpointer to a Menu Bar
[in]menuIndexThe menuIndex parameter specifies which Pull-Down menu to retrieve a pointer to. menuIndex must be greater than or equal to 0 and less than the number of menus in the specified Menu Bar item. Use the mdlDialog_menuBarGetNMenus function to determine the number of menus in a Menu Bar item.
Returns
SUCCESS, or NULL if an error occurs. This means that mbarP does not point at a Menu Bar item or menuIndex is out of range.
See also
mdlDialog_menuBarFindMenu
int mdlDialog_menuBarGetNItems ( DItem_PulldownMenu **  menuPP,
RawItemHdr mbarP,
UInt32  menuType,
long  menuId 
)

Returns the number of menu items contained within a specified Pull-Down menu.

Parameters
[in]mbarPThe mbarP parameter specifies a Menu Bar item.
Remarks
The Pull-Down menu can be specified in two ways. If a pointer to a menu was obtained through a call to mdlDialog_menuBarFindMenu or a previous call to mdlDialog_menuBarGetItem or mdlDialog_menuBarFindItem the menuPP parameter can be set so that it points to the pointer. The mbarP parameter is unused and can be NULL in this case.
Parameters
[in,out]menuPPIf menuPP is a pointer to NULL or a NULL pointer, the Menu Bar item will first be searched for a menu whose type is menuType and ID is menuId. If menuPP was not a NULL pointer, the location pointed at by menuPP will be set to be a pointer to the menu that was found, or NULL if the menu was not found. The mbarP parameter must point to a Menu Bar item.
[in]menuTypetype of menu
[in]menuIdresource ID of menu
Returns
The number of menu items in the specified menu, or -1 if an error occurs or the specified menu is not found.
See also
mdlDialog_menuBarFindMenu
int mdlDialog_menuBarGetNMenus ( RawItemHdr mbarP)

Returns the number of Pull-Down menus contained within the Menu Bar item specified by mbarP.

Parameters
[in]mbarPpointer to a Menu Bar
Returns
The number of Pull-Down menus in the specified Menu Bar item. or -1 if mbarP does not point at a Menu Bar item.
StatusInt mdlDialog_menuBarGetSelection ( UInt32 menuTypeP,
long *  menuIdP,
int *  subItemIndexP,
long *  searchIdP,
RawItemHdr mbarP 
)

Retrieves information about the last menu item that was selected by the user from the Menu Bar item specified by mbarP.

Parameters
[out]menuTypePresourceType of menu selected
[out]menuIdPresource ID of menu selected
[out]subItemIndexPitem index of item selected
[out]searchIdPsearch ID of item selected
Remarks
The resource type and resource ID of the last Pull-Down menu the user selected an item from are copied to the locations specified by the menuTypeP and menuIdP parameters. Either of these parameters can be NULL, which indicates that the caller doesn't need the corresponding value.
The index and search ID of the last user selected Pull-Down menu item are copied to the locations specified by the subItemIndexP and searchIdP parameters. Either of these parameters can be NULL, which indicates that the caller doesn't need the corresponding value.
Parameters
[in]mbarPThe mbarP parameter specifies a Menu Bar item.
Remarks
This function is usually called as part of a item hook function attached to the Menu Bar item. In this way one hook function can handle the processing of multiple Pull-Down menus and Pull-Down menu items. Usually the DITEM_MESSAGE_BUTTON message is trapped with buttonTrans equal to BUTTONTRANS_UP. This message is sent when the data button is released inside of a Pull-Down menu item. Different actions can be taken based on the menu and item within the menu that was just selected.
Returns
SUCCESS, or a non-zero value if an error occurs. This usually means that mbarP is not a pointer to a Menu Bar item.
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetNItems
StatusInt mdlDialog_menuBarHasFocus ( RawItemHdr mbarP)

Determines whether the menubar specified has the input focus.

Parameters
[in]mbarPspecifies the Menu Bar to test.
Returns
SUCCESS, or a non-zero value if the Menu Bar has focus.
See also
mdlDialog_menuBarToggle
StatusInt mdlDialog_menuBarInsertMenu ( RawItemHdr mbarP,
UInt32  menuType,
long  menuId,
DItem_PulldownMenu beforeMenuP 
)

Inserts the Pull-Down menu whose resource type is menuType and ID is menuId into the Menu Bar item specified by mbarP.

This function is obsolete. mdlDialog_menuBarInsMenu, which returns a pointer to the newly inserted Pull-Down menu item, should be used instead.

Parameters
[in]mbarPmust point to a Menu Bar item. It cannot be NULL.
[in]menuTypetype of menu to insert
[in]menuIdrsc ID of menu to insert
[in]beforeMenuPindicates which Pull-Down menu to insert the new menu before. A pointer to a Pull-Down menu can be obtained by calling mdlDialog_menuBarFindMenu, mdlDialog_menuBarFindItem, mdlDialog_menuBarGetItem or mdlDialog_menuBarGetNItems. If beforeMenuP is NULL, the Pull-Down menu will be appended at the end of the Menu Bar item's list of Pull-Down menus.
Returns
SUCCESS, or a non-zero value if an error occurs. This means that mbarP does not point to a Menu Bar item, the Pull-Down menu is not found, or beforeMenuP does not point to a Pull-Down menu.
See also
mdlDialog_menuBarFindMenu mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_menuBarGetNItems mdlDialog_menuBarInsMenu
DItem_PulldownMenu* mdlDialog_menuBarInsMenu ( RawItemHdr mbarP,
UInt32  menuType,
long  menuId,
DItem_PulldownMenu beforeMenuP 
)

Inserts the Pull-Down menu whose resource type is menuType and ID is menuId into the Menu Bar item specified by mbarP.

This function provides the same functionality as the now obsolete mdlDialog_menuBarInsertMenu except that mdlDialog_menuBarInsMenu returns a pointer to the newly inserted Pull-Down menu item.

Parameters
[in]mbarPmust point to a Menu Bar item. It cannot be NULL.
[in]menuTypetype of menu to insert
[in]menuIdrsc ID of menu to insert
[in]beforeMenuPindicates which Pull-Down menu to insert the new menu before. A pointer to a Pull-Down menu can be obtained by calling mdlDialog_menuBarFindMenu, mdlDialog_menuBarFindItem, mdlDialog_menuBarGetItem or mdlDialog_menuBarGetNItems. If beforeMenuP is NULL, the Pull-Down menu will be appended at the end of the Menu Bar item's list of Pull-Down menus.
Returns
A pointer to the inserted Pull-Down menu item, or NULL if an error occurs. This means that mbarP does not point to a Menu Bar item, the Pull-Down menu is not found, or beforeMenuP does not point to a Pull-Down menu.
See also
mdlDialog_menuBarFindMenu mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_menuBarGetNItems
DItem_PulldownMenu* mdlDialog_menuBarInsMenuEx ( RawItemHdr mbRiP,
UInt32  menuType,
long  menuId,
DItem_PulldownMenu beforeMenuP,
MdlDesc ownerMD 
)

Inserts the Pull-Down menu whose resource type is menuType and ID is menuId into the Menu Bar item specified by mbarP.

This function provides the same functionality as the now obsolete mdlDialog_menuBarInsertMenu except that mdlDialog_menuBarInsMenu returns a pointer to the newly inserted Pull-Down menu item.

Parameters
[in]mbRiPmust point to a Menu Bar item. It cannot be NULL.
[in]menuTypetype of menu to insert
[in]menuIdrsc ID of menu to insert
[in]beforeMenuPindicates which Pull-Down menu to insert the new menu before. A pointer to a Pull-Down menu can be obtained by calling mdlDialog_menuBarFindMenu, mdlDialog_menuBarFindItem, mdlDialog_menuBarGetItem or mdlDialog_menuBarGetNItems. If beforeMenuP is NULL, the Pull-Down menu will be appended at the end of the Menu Bar item's list of Pull-Down menus.
[in]ownerMDMdlDesc to own the inserted menu
Returns
A pointer to the inserted Pull-Down menu item, or NULL if an error occurs. This means that mbarP does not point to a Menu Bar item, the Pull-Down menu is not found, or beforeMenuP does not point to a Pull-Down menu.
See also
mdlDialog_menuBarFindMenu mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_menuBarGetNItems
StatusInt mdlDialog_menuBarMenuGetEnabled ( bool *  enabledP,
DItem_PulldownMenu menuP 
)

Retrieves the enabled state (enabled or disabled) of the Pull-Down menu specified by menuP.

The location pointed to by enableP is set to the menu's enabled state.

Parameters
[out]enabledPIf enabled is true, the Pull-Down menu title is drawn with normal bold text and the user can select items from the menu. If enabled is false, the Pull-Down menu title is drawn with dimmed text and the user cannot select any items from the menu.
[in]menuPmenu to get state of
Remarks
The Pull-Down menu is not redrawn when mdlDialog_menuBarMenuSetEnabled is called. Instead, it is redrawn either when the user causes an update to the Pull-Down menu entry (clicks on it) or the application calls mdlDialog_itemDraw for the Menu Bar item. It is recommended that the programmer call mdlDialog_itemDraw only after all necessary Pull-Downs have been enabled or disabled.
A pointer to a Pull-Down menu can be obtained by calling mdlDialog_menuBarFindMenu, mdlDialog_menuBarFindItem, mdlDialog_menuBarGetItem or mdlDialog_menuBarGetNItems.
Returns
SUCCESS, or a non-zero value if an error occurs. This means that menuP does not point to a Pull-Down menu.
See also
mdlDialog_menuBarFindMenu mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_menuBarGetNItems mdlDialog_menuBarMenuSetEnabled
StatusInt mdlDialog_menuBarMenuGetTitle ( WCharCP *  titlePP,
DItem_PulldownMenu menuP 
)

Retrieves a pointer to the title of the Pull-Down menu specified by menuP.

The location pointed to by titlePP is set to point to the Pull-Down menu's title.

Parameters
[out]titlePPpointer to title
[in]menuPmenu to get title of
Remarks
A pointer to a Pull-Down menu can be obtained by calling mdlDialog_menuBarFindMenu, mdlDialog_menuBarFindItem, mdlDialog_menuBarGetItem or mdlDialog_menuBarGetNItems.
Returns
SUCCESS, or a non-zero value if an error occurs. This means that menuP does not point to a Pull-Down menu.
See also
mdlDialog_menuBarFindMenu mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_menuBarGetNItems mdlDialog_menuBarMenuSetTitle
StatusInt mdlDialog_menuBarMenuSetEnabled ( DItem_PulldownMenu menuP,
bool  enabled 
)

Sets the enabled state (enabled or disabled) of the Pull-Down menu specified by menuP to the value specified by enabled.

Parameters
[in]menuPmenu to set enab.state
[in]enabledIf enabled is true, the Pull-Down menu title is drawn with normal bold text and the user can select items from the menu. If enabled is false, the Pull-Down menu title is drawn with dimmed text and the user cannot select any items from the menu.
Remarks
The Pull-Down menu is not redrawn when mdlDialog_menuBarMenuSetEnabled is called. Instead, it is redrawn either when the user causes an update to the Pull-Down menu entry (clicks on it) or the application calls mdlDialog_itemDraw for the Menu Bar item. It is recommended that the programmer call mdlDialog_itemDraw only after all necessary Pull-Downs have been enabled or disabled.
A pointer to a Pull-Down menu can be obtained by calling mdlDialog_menuBarFindMenu, mdlDialog_menuBarFindItem, mdlDialog_menuBarGetItem or mdlDialog_menuBarGetNItems.
Returns
SUCCESS, or a non-zero value if an error occurs. This means that menuP does not point to a Pull-Down menu.
See also
mdlDialog_menuBarFindMenu mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_menuBarGetNItems mdlDialog_menuBarMenuGetEnabled
void mdlDialog_menuBarMenuSetTitle ( DItem_PulldownMenu menuP,
WCharCP  titleP 
)

Sets the title of the pull- down menu specified by menuP to be the string pointed to by titleP.

Remarks
A pointer to a Pull-Down menu can be obtained by calling mdlDialog_menuBarFindMenu, mdlDialog_menuBarFindItem, mdlDialog_menuBarGetItem or mdlDialog_menuBarGetNItems.
Parameters
[in]menuPmenu to set title of
[in]titlePnew title
See also
mdlDialog_menuBarFindMenu mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_menuBarGetNItems mdlDialog_menuBarMenuGetTitle
StatusInt mdlDialog_menuBarRegister ( DItem_PulldownMenuItem newMenuItemP,
long  menuBarId,
WCharCP  appName,
bool  disableMicroStation,
bool  setCmdWindowTitle 
)

Creates a Menu Bar item from resource information The newly created menu appears as a selection on the applications menu.

Parameters
[out]newMenuItemPpoints to the newly created Menu Bar item.
[in]menuBarIdtells which Menu Bar to create.
[in]appNamegives the full name of the application owning the menu. The name is inserted into the applications menu.
[in]disableMicroStationindicates whether the MicroStation Menu Bar should be disabled when this menu is active
[in]setCmdWindowTitleindicates whether the title of the Command Window should be set to appName.
Returns
SUCCESS, or a non-zero value if there is an error.
StatusInt mdlDialog_menuBarSetDefault ( DItem_PulldownMenuItem menuItemP,
WCharCP  taskIdP,
long  menuBarId 
)

Sets MicroStation's default Command Window Menu Bar from among the choices on the applications menu.

Parameters
[in]menuItemPis a pointer to the Pull-Down menu item on the applications menu that controls the menu to be made the new default. If menuItemP is NULL, taskIdP and menuBarId identify the desired Menu Bar instead.
[in]taskIdPis a pointer to the task ID. Passing NULL indicates the current task.
[in]menuBarIdid of Menu Bar, 0 matches any found
Returns
SUCCESS, or a non-zero value on error.
StatusInt mdlDialog_menuBarToggle ( RawItemHdr mbarP)

Toggles the appearance of the specified menubar.

Parameters
[in]mbarPspecifies the Menu Bar to toggle.
Returns
SUCCESS, or a non-zero value if an error occurs.
See also
mdlDialog_menuBarHasFocus
StatusInt mdlDialog_menuBarUnloadApp ( DItem_PulldownMenuItem menuItemP,
WCharCP  taskIdP,
long  menuBarId 
)

Removes an applications menu item and the associated Menu Bar.

Parameters
[in]menuItemPpoints to the item to delete from the applications Pull-Down menu. If it is NULL, taskIdP and menuBarId may identify the item.
[in]taskIdPis a pointer to the task ID. Passing NULL indicates the current task.
[in]menuBarIdid of Menu Bar, 0 matches any found
Returns
SUCCESS, or a non-zero value on error.
StatusInt mdlDialog_menuBarUnloadAppItem ( DItem_PulldownMenuItem menuItemP)

Unloads from memory the specified application menu item and Menu Bar.

Parameters
[in]menuItemPspecifies the Menu Bar item to unload.
Returns
SUCCESS, or a non-zero value on error.
StatusInt mdlDialog_textPDMItemSetMark ( DItem_PulldownMenuItem menuItemP,
int  markType 
)

Sets the mark of the Text Pull-down Menu item specified by menuItemP to the value specified by markType.

markType can be one of the following constants: MARK_TOGGLE_IN, MARK_TOGGLE_OUT, MARK_RADIO_IN, MARK_RADIO_OUT or MARK_RIGHT_ARROW.

Remarks
A pointer to a Text Pull-down Menu item can be obtained by calling mdlDialog_menuBarFindItem or mdlDialog_menuBarGetItem.
These functions are usually called as part of an item hook function attached to a Menu Bar item. The DITEM_MESSAGE_BUTTON message should be trapped with buttonTrans equal to BUTTONTRANS_DOWN. This message is sent when the data button is pressed inside a Menu Bar item and before any Pull-Down menus are displayed. Trapping this message allows the state, label, or mark of all Text Pull-down Menu items to be correctly set before the menus are displayed.
Parameters
[in]menuItemPitem to set
[in]markTypeMARK_TOGGLE_OUT | | RADIO_OUT |
Returns
SUCCESS, or a non-zero value if an error occurs. This means that menuItemP does not point to a Text Pull-down Menu item.
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_textPDMItemSetLabel mdlDialog_textPDMItemSetEnabled

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.