Classes | Functions
Dialog Box General

Classes

struct  MSDialog
 MSDialog is the base class for Microstation/PowerPlatform desktop-based dialog boxes and view windows. More...
 

Functions

int mdlDialog_setFilterString (WCharCP filterString)
 Sets the file filter string of a user-defined File Open or File Create Dialog Box. More...
 
int mdlDialog_autoOpen (int *numOpenedP, UInt32 dialogWindowType, bool openDialogs)
 Opens any dialogs belonging to the calling application that were present on the screen when MicroStation last shut down. More...
 
MSDialogP mdlDialog_find (RscId dialogId, MdlDescP ownerMD)
 Gets a pointer to the currently open Dialog Box whose resource ID is dialogId. More...
 
MSDialogP mdlDialog_findByTypeAndId (RscType dialogType, RscId dialogId, MdlDescP ownerMD)
 Obtains a pointer to an open Dialog Box according to its resource class (dialog type) and ID. More...
 
MSDialogP mdlDialog_getFirst (void)
 Gets the first dialog in the dialog list. More...
 
MSDialogP mdlDialog_getNext (MSDialogP dbP)
 Gets the next dialog in the dialog list, given a specific dialog. More...
 
MSDialogP mdlDialog_getParent (MSDialogP dbP)
 Gets the dialog assigned as the parent of a given dialog. More...
 
StatusInt mdlDialog_setParent (MSDialogP dbP, MSDialogP parentDbP)
 Sets the parent dialog of a given child dialog. More...
 
bool mdlDialog_isAncestor (MSDialogP dbP, MSDialogP testDbP)
 Determines if a dialog is the parent or ancestor of another dialog. More...
 
MSDialogP mdlDialog_getChild (MSDialogP dbP, MSDialogP startDbP)
 Retrieves the first child dialog of a parent after a given child. More...
 
bool mdlDialog_getMinimumSize (int *minWidthP, int *minHeightP, MSDialogP dbP)
 Retrieves the minimum size from a dialog. More...
 
RscId mdlDialog_getResourceId (MSDialogP dbP)
 Retrieves the resource Id from a dialog. More...
 
bool mdlDialog_hasFocus (MSDialogP dbP)
 Determines if a given Dialog Box currently has the input focus. More...
 
MSDialogP mdlDialog_open (RscFileHandle rFileH, RscId resourceId)
 Opens a modal or modeless Dialog Box. More...
 
MSDialogP mdlDialog_openWithMD (RscFileHandle rFileH, MdlDescP ownerMD, RscId resourceId)
 An extension of mdlDialog_open which allows the caller to pass a MDL Descriptor of the owner task of the dialog. More...
 
int mdlDialog_openAlert (WCharCP stringP)
 Opens a modal Dialog Box that contains two push buttons labeled OK and Cancel, and a multi-line label item that will be set to the string pointed to by stringP. More...
 
int mdlDialog_openAlertById (RscId dialogId, WCharCP stringP)
 Opens an alternate alert dialog box. More...
 
int mdlDialog_openMessageBox (RscId dialogId, WCharCP stringP, MessageBoxIconType whichIcon)
 Opens a modal Dialog Box which contains one to three push buttons, a multi-line label item, and one of four icons. More...
 
int mdlDialog_openInfoBox (WCharCP stringP)
 Opens a modal Dialog Box that contains a single push button labeled OK, and a multi-line label item that will be set to the string pointed to by stringP. More...
 
StatusInt mdlDialog_openModal (int *lastActionTypeP, RscFileHandle rFileH, RscId resourceId)
 Opens a modal Dialog Box. More...
 
StatusInt mdlDialog_openModalWithMD (int *lastActionTypeP, RscFileHandle rFileH, RscId resourceId, MdlDesc *ownerMD)
 An extension of mdlDialog_openModal which allows the caller to pass a MDL Descriptor of the owner task of the dialog. More...
 
MdlDescP mdlDialog_ownerMDGet (MSDialogP dbP)
 Returns the MDL descriptor of the task that owns the given Dialog Box. More...
 
int mdlDialog_parentIdGet (MSDialogP dbP)
 Retrieves the resource ID of the parent of the specified Dialog Box. More...
 
StatusInt mdlDialog_parentIdSet (MSDialogP dbP, long parentId)
 Sets the parent resource ID of the specified Dialog Box to be parentId. More...
 
UserDataP mdlDialog_userDataPtrGet (MSDialogP dbP)
 Retrieves the user data pointer of the specified Dialog Box. More...
 
StatusInt mdlDialog_userDataPtrSet (MSDialogP dbP, UserDataP userDataP)
 Sets the user data pointer of the specified Dialog Box to be userDataP. More...
 
MSDialogP mdlDialog_commandWindowGet (void)
 Returns a MSDialog pointer of the prompt and message area, which can be referenced without having to consider the currently selected interface style. More...
 
StatusInt mdlDialog_hookDialogSendUserMsg (MSDialogP dbP, int type, CallbackArgP userDataP)
 Sends a user message to any dialog hook function that is attached to the specified Dialog Box. More...
 
StatusInt mdlDialog_hookItemSendUserMsg (RawItemHdr *riP, int type, CallbackArgP userDataP)
 Sends a user message to any item hook function attached to the Dialog Box item specified by rihP. More...
 
StatusInt mdlDialog_hookPublish (int nHooks, DialogHookInfo *hooks)
 Associates hook function ID numbers with hook function addresses. More...
 
bool mdlDialog_isFirstLoad (RscId dialogId, MdlDescP ownerMD)
 Determines if a Dialog Box has been opened before. More...
 
StatusInt mdlDialog_lastActionTypeSet (MSDialogP dbP, int actionType)
 Sets the action type that is sent to a dialog hook function as part of the DIALOG_MESSAGE_DESTROY message when a Dialog Box is closed. More...
 
StatusInt mdlDialog_popupClose (MSDialogP dbP, bool bUpdate)
 Closes a popup dialog in the proper manner. More...
 
RawItemHdrmdlDialog_popupGetOwnerItem (MSDialogP dbP)
 Retrieves the owning dialog item which opened the popup window, if any. More...
 
MSDialogmdlDialog_popupGetOwnerDialog (MSDialogP dbP)
 Retrieves the owning dialog box which opened the popup window. More...
 
StatusInt mdlDialog_synonymsSynch (RscFileHandle rFileH, int synonymsId, MdlDescP ownerMD)
 Forces the appearance of all items in the synonym resource specified by synonymsId to match their external state. More...
 
StatusInt mdlDialog_synonymsDraw (RscFileHandle rFileH, int synonymsId, MdlDescP ownerMD)
 Draws all items in the synonym resource specified by synonymsId. More...
 
StatusInt mdlDialog_synonymSetVisibility (int synonymsId, bool visible)
 Sets the visibility flag in all items in the synonym resource specified by synonymsId. More...
 
StatusInt mdlDialog_synonymEnable (int synonymsId, bool enable)
 Sets the enabled flag in all items in the synonym resource specified by synonymsId. More...
 
StatusInt mdlDialog_synonymReloadData (int synonymsId, bool redraw)
 Forces all items in the synonym resource specified by synonymsId to reload their data. More...
 
RawItemHdrP mdlDialog_viewPopupMenuPGet (int buttonNum)
 Retrieves the RawItemHdr pointer of the Popup Menu associated with a View window. More...
 
RawItemHdrP mdlDialog_defaultViewPopupMenuPGet (int buttonNum)
 Retrieves the RawItemHdr pointer of the default (non-dgnlib) Popup Menu associated with a View window. More...
 
void mdlDialog_refreshNamedToolBox (WCharCP toolBoxPath)
 Refreshes the context of a Named ToolBox. More...
 
void mdlDialog_setAllowToolBoxOverrides (bool value)
 Sets processing flag to allow for customized named ToolBoxes to override the original ToolBoxes when calling mdlDialog_find and mdlDialog_open functions. More...
 
void mdlDialog_setAdditionalAboutLegalText (WCharCP wText)
 Sets additional text to appear in the About Box - "Legal and Patent Notices" section. More...
 
WCharCP mdlDialog_getAdditionalAboutLegalText ()
 Gets any additional text set to appear in the About Box - "Legal and Patent Notices" section. More...
 
MSDialogmdlDialog_create (RscFileHandle rFileH, MdlDescP ownerMD, RscType dialogType, RscId dialogId, bool noWarnResourceError)
 Opens a modal or modeless Dialog Box without displaying it on the user's display. More...
 
StatusInt mdlDialog_ownerMDSet (MSDialogP dbP, MdlDescP ownerMD)
 Sets the MDL descriptor of the task that owns the given Dialog Box. More...
 
void mdlDialog_show (MSDialogP dbP)
 Brings a Dialog Box back into view. More...
 
void mdlDialog_setFocusToHome ()
 Sets focus to the Home position. More...
 
StatusInt mdlDialog_initializeToolSettings (RscFileHandle rfHandle, MdlDescP ownerMD, int ditemListId)
 Populates the Tool Settings window based on the dialog item list specified. More...
 
MSDialogmdlDialog_getToolSettings ()
 Retrieves the pointer to the Tool Settings MSDialog. More...
 
StatusInt mdlDialog_getEditMenuInfo (DItem_PulldownMenu *pMenu, EditMenuInfo *pMenuInfo)
 Retrieves information about the popup edit menu for the current item. More...
 
void mdlDialog_getToggleIconIds (RscId *onIconIdP, RscId *offIconIdP, MSDialogP dbP)
 Retrieves the appropriate icons Ids for on and off icons based on the current font height. More...
 
RscId mdlDialog_getSizedColorPatchId (MSDialogP dbP, RscId iconCmdId)
 Retrieves the appropriate icon id associated with a particular IconCmd id based on the current font height. More...
 
MSWindowP mdlDialog_getNETDockingParentWindow (MSDialogP dbP)
 Retrieves the MSWindow pointer of the .NET Docking parent of a Dialog Box. More...
 
MSDialogP mdlDialog_getNETDockingChildWindow (MSWindowP gwP)
 Retrieves the MSDialog pointer of the .NET Docking child of a Window. More...
 
void mdlDialog_sendMessagesOnUnload (MdlDescP mdlDescP, bool bValue)
 Indicates whether the specified MDL application wishes to receive Dialog and Dialog Item messages when the application is unloading. More...
 
StatusInt mdlDialog_getNETDockedExtents (MSDialogP dbP)
 Gets the Docked Extents from a .NET Dockable dialog and sends those extents to the .NET docking system. More...
 
void mdlDialog_setCacheName (MSDialogP dbP, WCharCP pName)
 Sets the dialog's unique cache name. More...
 
bool mdlDialog_isAutoOpen (MSDialogP dbP)
 Determines whether the dialog is Auto-Open. More...
 
void mdlDialog_setAutoOpen (MSDialogP dbP, bool autoOpen)
 Sets the dialog to Auto-Open. More...
 
void mdlDialog_setAutoOpenKeyin (MSDialogP dbP, WCharCP keyin)
 Sets the Keyin to use when opening the dialog as Auto-Open. More...
 
bool mdlDialog_isCloseable (MSDialogP dbP)
 Determines whether the dialog is closeable. More...
 
void mdlDialog_setCloseable (MSDialogP dbP, bool closeable)
 Sets the Closeable property for a MSDialog. More...
 
bool mdlDialog_isNETDocked (MSDialogP dbP)
 Determines whether the dialog is docked. More...
 
AutoHideState mdlDialog_getAutoHideState (MSDialogP dbP)
 Gets the AutoHide / Push-pin state for a .NET Dockable dialog. More...
 
bool mdlDialog_isAutoHideCollapsed (MSDialogP dbP)
 Determines whether the dialog is in an Auto-Hide Collapsed state. More...
 
bool mdlDialog_isAutoHideExpanded (MSDialogP dbP)
 Determines whether the dialog is in an Auto-Hide Expanded state. More...
 
StatusInt mdlDialog_autoHideExpand (MSDialogP dbP, BSIRectP rectP)
 Expands the dialog from an Auto-Hide Collapsed state. More...
 
StatusInt mdlDialog_autoHideCollapse (MSDialogP dbP)
 Collapses the dialog from an Auto-Hide Expanded state. More...
 
StatusInt mdlDialog_autoHidePin (MSDialogP dbP)
 Pins the dialog from an Auto-Hide Unpinned state. More...
 
StatusInt mdlDialog_autoHideUnpin (MSDialogP dbP)
 Unpins the dialog from an Auto-Hide Pinned state. More...
 
StatusInt mdlDialog_getFloatingSize (MSDialogP dbP, Point2d *floatingSize)
 Gets the .NET Dockable Dialog's floating size. More...
 
StatusInt mdlDialog_setNETDockingMinimumSize (MSDialogP dbP, int width, int height)
 Sets the MinimumSize property for a .NET Dockable MSDialog. More...
 
StatusInt mdlDialog_setNETDockingUndockable (MSDialogP dbP, bool undockable)
 Sets the Undockable property for a .NET Dockable MSDialog. More...
 
StatusInt mdlDialog_setNETDockingCanAutoHide (MSDialogP dbP, bool canAutoHide)
 Sets the CanAutoHide property for a .NET Dockable MSDialog. More...
 
bool mdlDialog_containsToolBox (MSDialogP dbP)
 Determines if a Dialog Box contains a ToolBox item. More...
 
MSDialogP mdlDialog_toolBoxCmd (RscFileHandle rFileH, MdlDescP ownerMD, RscId resourceId, WCharCP unparsedCP)
 Processes a 'DIALOG TOOLBOX' command. More...
 
void mdlDialog_refresh (MSDialogP dbP)
 Refreshes the contents of a Dialog Box. More...
 

Detailed Description

Function Documentation

StatusInt mdlDialog_autoHideCollapse ( MSDialogP  dbP)

Collapses the dialog from an Auto-Hide Expanded state.

Parameters
[in]dbPThe .NET Dockable MSDialog
Returns
SUCCESS if the Dialog was collapsed. Otherwise, it returns ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_autoHideExpand ( MSDialogP  dbP,
BSIRectP  rectP 
)

Expands the dialog from an Auto-Hide Collapsed state.

Parameters
[in]dbPThe .NET Dockable MSDialog
[in]rectPThe rectangle, in global coordinates, for the expanded dialog. If NULL, it opens near the associated Auto-Hide tab.
Returns
SUCCESS if the Dialog was expanded. Otherwise, it returns ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_autoHidePin ( MSDialogP  dbP)

Pins the dialog from an Auto-Hide Unpinned state.

Parameters
[in]dbPThe .NET Dockable MSDialog
Returns
SUCCESS if the Dialog was pinned. Otherwise, it returns ERROR.
See also
mdlDialog_getAutoHideState
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_autoHideUnpin ( MSDialogP  dbP)

Unpins the dialog from an Auto-Hide Pinned state.

Parameters
[in]dbPThe .NET Dockable MSDialog
Returns
SUCCESS if the Dialog was unpinned. Otherwise, it returns ERROR.
See also
mdlDialog_getAutoHideState
Remarks
Required Library: mdlbltin.lib
int mdlDialog_autoOpen ( int *  numOpenedP,
UInt32  dialogWindowType,
bool  openDialogs 
)

Opens any dialogs belonging to the calling application that were present on the screen when MicroStation last shut down.

If this function is used, it is generally called during the application's initialization.

Parameters
[out]numOpenedPis a pointer to an integer where the number of dialogs opened is returned. If openDialogs if false, the value pointed to by numOpenedP will indicate the number of dialogs that would have been opened if openDialogs was true.
[in]dialogWindowTypeindicates whether dialogs should be redisplayed.
[in]openDialogsindicates whether the dialogs should really be opened or whether a count should just be obtained of those that could be opened.
Returns
SUCCESS if the dialogs could be opened, otherwise it returns ERROR.
Remarks
Required Library: mdlbltin.lib
MSDialogP mdlDialog_commandWindowGet ( void  )

Returns a MSDialog pointer of the prompt and message area, which can be referenced without having to consider the currently selected interface style.

Returns
A pointer to the MSDialog that contains the prompt and message area. In the command window style interface, this function returns a pointer to the command window. In the status bar style interface, this function returns a pointer to the status bar.
See also
mdlDialog_keyinWindowGet mdlDialog_statusAreaGet mdlDialog_overallTitleBarGet mdlDialog_menuBarGetCmdWinP
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_containsToolBox ( MSDialogP  dbP)

Determines if a Dialog Box contains a ToolBox item.

Parameters
[in]dbPMSDialog to check
Returns
true if the Dialog Box contains a Tool Box
Remarks
Required Library: mdlbltin.lib
MSDialog* mdlDialog_create ( RscFileHandle  rFileH,
MdlDescP  ownerMD,
RscType  dialogType,
RscId  dialogId,
bool  noWarnResourceError 
)

Opens a modal or modeless Dialog Box without displaying it on the user's display.

It returns immediately to its caller. Most dialogs should be opened with the mdlDialog_open and mdlDialog_openModal functions instead.

Parameters
[in]rFileHspecifies the resource file to search for the Dialog Box resource. If NULL, all the calling application's open resource files and then MicroStation's open resource files will be searched.
[in]ownerMDspecifies the MDL descriptor of the application which is to own the Dialog Box. If NULL, the Dialog Box is owned by the calling application.
[in]dialogTypespecifies the resource type of the Dialog Box resource that is used to create the Dialog Box. The Dialog Box will be modal if the DIALOGATTR_MODAL bit is set in the attributes field of the Dialog Box resource.
[in]dialogIdspecifies the resource ID of the Dialog Box resource that is used to create the Dialog Box. The Dialog Box will be modal if the DIALOGATTR_MODAL bit is set in the attributes field of the Dialog Box resource.
[in]noWarnResourceErrorindicates whether a warning message should be displayed if the resource could not be found. This parameter is usually false.
Returns
A pointer to the created Dialog Box. NULL is returned if the Dialog Box resource was not found or errors occurred while loading the items contained in the Dialog Box.
See also
mdlDialog_open mdlDialog_openModal
Remarks
Required Library: mdlbltin.lib
RawItemHdrP mdlDialog_defaultViewPopupMenuPGet ( int  buttonNum)

Retrieves the RawItemHdr pointer of the default (non-dgnlib) Popup Menu associated with a View window.

Parameters
[in]buttonNumthe RESET or TENTPNT button number
Returns
The RawItemHdr pointer of the Popup Menu associated with a View window.
Remarks
Required Library: mdlbltin.lib
MSDialogP mdlDialog_find ( RscId  dialogId,
MdlDescP  ownerMD 
)

Gets a pointer to the currently open Dialog Box whose resource ID is dialogId.

Parameters
[in]dialogIdID of dialog to find
[in]ownerMDis the MDL descriptor of the owner of the Dialog Box. If NULL is specified, then the calling application is assumed.
Returns
A pointer to the found Dialog Box, or NULL if no Dialog Box with the specified resource ID is currently open.
See also
mdlDialog_findByTypeAndId
Remarks
Required Library: mdlbltin.lib
MSDialogP mdlDialog_findByTypeAndId ( RscType  dialogType,
RscId  dialogId,
MdlDescP  ownerMD 
)

Obtains a pointer to an open Dialog Box according to its resource class (dialog type) and ID.

Parameters
[in]dialogTypespecifies the type of dialog. This is usually RTYPE_DialogBox.
[in]dialogIdis the resource ID of the Dialog Box.
[in]ownerMDis the MDL descriptor of the owner of the Dialog Box. If NULL is specified, then the calling application is assumed.
Returns
A pointer to the targeted Dialog Box if found, otherwise it returns NULL.
See also
mdlDialog_find
Remarks
Required Library: mdlbltin.lib
WCharCP mdlDialog_getAdditionalAboutLegalText ( )

Gets any additional text set to appear in the About Box - "Legal and Patent Notices" section.

Remarks
The last call to mdlDialog_setAdditionalAboutLegalText sets the text to use, so call mdlDialog_getAdditionalAboutLegalText and append to any previously set text.
AutoHideState mdlDialog_getAutoHideState ( MSDialogP  dbP)

Gets the AutoHide / Push-pin state for a .NET Dockable dialog.

Parameters
[in]dbPThe .NET Dockable MSDialog
Returns
AutoHideState from dlogitem.h.
Remarks
Required Library: mdlbltin.lib
MSDialogP mdlDialog_getChild ( MSDialogP  dbP,
MSDialogP  startDbP 
)

Retrieves the first child dialog of a parent after a given child.

A parent/child relationship can be established after the child dialog is opened by calling mdlDialog_setParent. By providing the previous child, mdlDialog_getChild may be used to loop through all the children of a parent dialog.

Parameters
[in]dbPMSDialog which may have children
[in]startDbPMSDialog after which to start search. NULL begins at the start of the list.
Returns
Child dbP starting after startdbP, or NULL if no children.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_getEditMenuInfo ( DItem_PulldownMenu pMenu,
EditMenuInfo pMenuInfo 
)

Retrieves information about the popup edit menu for the current item.

Parameters
[in]pMenuthe menu to obtain information about
[in,out]pMenuInforeceives the information about the popup edit menu
Returns
SUCCESS if the current item supports the popup edit menu
Remarks
Required Library: mdlbltin.lib
MSDialogP mdlDialog_getFirst ( void  )

Gets the first dialog in the dialog list.

The mdlDialog_getFirst and mdlDialog_getNext functions are used together to "walk through" all MicroStation dialogs. The program first calls mdlDialog_getFirst to get the first dialog in the list, and then repeatedly calls mdlDialog_getNext to get all the other dialogs. The current parameter must be the return value from mdlDialog_getFirst or mdlDialog_getNext.

Remarks
A loop that processes all dialogs can be coded:
MSDialog *current;
for (current=mdlDialog_getFirst(); current;
current=mdlDialog_getNext(current))
process MSDialog here
Returns
A pointer to a MSDialog. When there are no more dialogs, a NULL pointer is returned.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_getFloatingSize ( MSDialogP  dbP,
Point2d *  floatingSize 
)

Gets the .NET Dockable Dialog's floating size.

Parameters
[in]dbPThe .NET Dockable MSDialog
[out]floatingSizeThe size of the .NET Dockable MSDialog in Floating mode in Point2d format.
Returns
The Floating mode size of a .NET Dockable MSDialog in Point2d format.
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_getMinimumSize ( int *  minWidthP,
int *  minHeightP,
MSDialogP  dbP 
)

Retrieves the minimum size from a dialog.

Parameters
[out]minWidthPPointer to an integer receiving the minimum width
[out]minHeightPPointer to an integer receiving the minimum height
[in]dbPMSDialog from which to get its minimum size
Returns
A boolean indicating whether the minimum size was determined.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_getNETDockedExtents ( MSDialogP  dbP)

Gets the Docked Extents from a .NET Dockable dialog and sends those extents to the .NET docking system.

Parameters
[in]dbPThe .NET Dockable MSDialog
Returns
SUCCESS if it is able to get the docked extents. Otherwise, it returns ERROR.
Remarks
Required Library: mdlbltin.lib
MSDialogP mdlDialog_getNETDockingChildWindow ( MSWindowP  gwP)

Retrieves the MSDialog pointer of the .NET Docking child of a Window.

Parameters
[in]gwPWindow for which to get the .NET Docking child dialog
Returns
The MSDialog pointer of the .NET Docking child.
Remarks
Required Library: mdlbltin.lib
MSWindowP mdlDialog_getNETDockingParentWindow ( MSDialogP  dbP)

Retrieves the MSWindow pointer of the .NET Docking parent of a Dialog Box.

Parameters
[in]dbPMSDialog for which to get the .NET Docking parent window
Returns
The MSWindow pointer of the .NET Docking parent of the Dialog Box.
Remarks
Required Library: mdlbltin.lib
MSDialogP mdlDialog_getNext ( MSDialogP  dbP)

Gets the next dialog in the dialog list, given a specific dialog.

The mdlDialog_getFirst and mdlDialog_getNext functions are used together to "walk through" all MicroStation dialogs. The program first calls mdlDialog_getFirst to get the first dialog in the list, and then repeatedly calls mdlDialog_getNext to get all the other dialogs. The current parameter must be the return value from mdlDialog_getFirst or mdlDialog_getNext.

Parameters
[in]dbPcurrent Dialog Box to get next from
Remarks
A loop that processes all dialogs can be coded:
MSDialog *current;
for (current=mdlDialog_getFirst(); current;
current=mdlDialog_getNext(current))
process MSDialog here
Returns
A pointer to a MSDialog. When there are no more dialogs, a NULL pointer is returned.
Remarks
Required Library: mdlbltin.lib
MSDialogP mdlDialog_getParent ( MSDialogP  dbP)

Gets the dialog assigned as the parent of a given dialog.

After the child dialog is opened, the application may call mdlDialog_setParent to establish this parent/child relationship.

Parameters
[in]dbPMSDialog to get the parent for
Returns
A pointer to a MSDialog. When the dialog has no parent, a NULL pointer is returned.
Remarks
Required Library: mdlbltin.lib
RscId mdlDialog_getResourceId ( MSDialogP  dbP)

Retrieves the resource Id from a dialog.

Parameters
[in]dbPMSDialog from which to get its Id
Returns
The Id of the MSDialog.
Remarks
Required Library: mdlbltin.lib
RscId mdlDialog_getSizedColorPatchId ( MSDialogP  dbP,
RscId  iconCmdId 
)

Retrieves the appropriate icon id associated with a particular IconCmd id based on the current font height.

The icons associated with these Ids are defined in dlogids.r.h, are located in ustation.rsc and may be used in a ListBox cell to denote color and status.

Parameters
[in]dbPMSDialog in which the icons will be shown
[in]iconCmdIdThe id of the IconCmd associated with the sized icons. Eg. ICONCMDID_ColorPatch.
Returns
The id of the icon associated with a particular IconCmd based on the current font height
Remarks
Required Library: mdlbltin.lib
void mdlDialog_getToggleIconIds ( RscId onIconIdP,
RscId offIconIdP,
MSDialogP  dbP 
)

Retrieves the appropriate icons Ids for on and off icons based on the current font height.

The icons associated with these Ids are located in ustation.rsc and may be used in a ListBox cell to denote on and off flags.

Parameters
[out]onIconIdPreceives the icon id for the ON icon
[out]offIconIdPreceives the icon id for the OFF icon
[in]dbPMSDialog in which the icons will be shown
Remarks
Required Library: mdlbltin.lib
MSDialog* mdlDialog_getToolSettings ( )

Retrieves the pointer to the Tool Settings MSDialog.

Returns
The pointer to the Tool Settings MSDialog
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_hasFocus ( MSDialogP  dbP)

Determines if a given Dialog Box currently has the input focus.

Parameters
[in]dbPis the dialog to check for the input focus.
Returns
true if the dialog pointed to by dbP has the input focus or else it returns false.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_hookDialogSendUserMsg ( MSDialogP  dbP,
int  type,
CallbackArgP  userDataP 
)

Sends a user message to any dialog hook function that is attached to the specified Dialog Box.

Remarks
The type and userDataP parameters are simply passed on to the hook function. They can be any value the MDL programmer wishes.
Parameters
[in]dbPMSDialog to send dialog hook user message
[in]typetype of user message
[in]userDataPuser defined pointer passed along in message
Returns
SUCCESS, or true if an error occurs. This means that dbP is not a pointer to a Dialog Box or rihP is not a pointer to a dialog item header.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_hookItemSendUserMsg ( RawItemHdr riP,
int  type,
CallbackArgP  userDataP 
)

Sends a user message to any item hook function attached to the Dialog Box item specified by rihP.

Parameters
[in]riPitem whose hook we're sending user message
[in]typetype of user message
[in]userDataPuser defined pointer passed along in message
Remarks
The type and userDataP parameters are simply passed on to the hook function. They can be any value the MDL programmer wishes.
Returns
SUCCESS, or true if an error occurs. This means that dbP is not a pointer to a Dialog Box or rihP is not a pointer to a dialog item header.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_hookPublish ( int  nHooks,
DialogHookInfo hooks 
)

Associates hook function ID numbers with hook function addresses.

Parameters
[in]nHooksparameter specifies the size of the hooks array. Each member of the hooks array consists of a hook function ID and an MDL function address.
[in]hooksarray of item and dialog hooks
Remarks
The mdlDialog_hookPublish function is usually called near the beginning of an MDL application program. It must be called before any Dialog Boxes that use hook functions are opened.
For example, suppose you include file ids.h which contains the following definitions: "#define" HOOKITEMID_listHook 1 an item hook function ID "#define" HOOKDIALOGID_dialogHook 2 a dialog hook func. ID
Then the following lines would appear in example.mc:
void example_listHook(), example_dialogHook();
static DialogHookInfo uHooks[]=
{
{HOOKITEMID_listHook, example_listHook},
{HOOKDIALOGID_dialogHook, example_dialogHook},
};
main(int argc, char *argv[])
{
...
mdlDialog_hookPublish(sizeof(uHooks)/sizeof(DialogHookInfo), uHooks);
...
}
Returns
SUCCESS or ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_initializeToolSettings ( RscFileHandle  rfHandle,
MdlDescP  ownerMD,
int  ditemListId 
)

Populates the Tool Settings window based on the dialog item list specified.

Parameters
[in]rfHandleresource file handle of the resource containing the MSDialog item list
[in]ownerMDMDL Descriptor of the owning MDL task
[in]ditemListIdid of the dialog item list to load into the Tool Settings window
Returns
SUCCESS if it is able to load the dialog item list. Otherwise, it returns ERROR.
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_isAncestor ( MSDialogP  dbP,
MSDialogP  testDbP 
)

Determines if a dialog is the parent or ancestor of another dialog.

A parent/child relationship can be established after the child dialog is opened by calling mdlDialog_setParent.

Parameters
[in]dbPMSDialog which may have a parent
[in]testDbPMSDialog which may be an ancestor
Returns
true if testDbP is an ancestor of dbP.
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_isAutoHideCollapsed ( MSDialogP  dbP)

Determines whether the dialog is in an Auto-Hide Collapsed state.

Parameters
[in]dbPThe .NET Dockable MSDialog
Returns
true if the dialog is in an Auto-Hide Collapsed state.
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_isAutoHideExpanded ( MSDialogP  dbP)

Determines whether the dialog is in an Auto-Hide Expanded state.

Parameters
[in]dbPThe .NET Dockable MSDialog
Returns
true if the dialog is in an Auto-Hide Expanded state.
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_isAutoOpen ( MSDialogP  dbP)

Determines whether the dialog is Auto-Open.

Parameters
[in]dbPa pointer to the MSDialog
Returns
true if the dialog is Auto-Open.
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_isCloseable ( MSDialogP  dbP)

Determines whether the dialog is closeable.

Parameters
[in]dbPa pointer to the MSDialog
Returns
TRUE if the dialog is closeable.
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_isFirstLoad ( RscId  dialogId,
MdlDescP  ownerMD 
)

Determines if a Dialog Box has been opened before.

Parameters
[in]dialogIdID of dialog to find
[in]ownerMDis the MDL descriptor of the owner of the Dialog Box. If NULL is specified, then the calling application is assumed.
Returns
true if the Dialog Box has not been opened before
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_isNETDocked ( MSDialogP  dbP)

Determines whether the dialog is docked.

Parameters
[in]dbPThe .NET Dockable MSDialog
Returns
true if the dialog is docked.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_lastActionTypeSet ( MSDialogP  dbP,
int  actionType 
)

Sets the action type that is sent to a dialog hook function as part of the DIALOG_MESSAGE_DESTROY message when a Dialog Box is closed.

It is used to indicate why the Dialog Box was closed.

Parameters
[in]dbPparameter indicates which Dialog Box to set the last action type for.
[in]actionTypeparameter specifies the Dialog Box's last action type.
Remarks
The mdlDialog_lastActionTypeSet function is called as part of the item hook function that is attached to the special OK and Cancel push buttons which have IDs PUSHBUTTONID_OK and PUSHBUTTONID_Cancel. This is how mdlDialog_openModal can return which push button was pressed. Most MDL dialog programmers will never need to call this function.
Returns
SUCCESS, or ERROR if dbP is not a pointer to a Dialog Box.
See also
mdlDialog_openModal
Remarks
Required Library: mdlbltin.lib
MSDialogP mdlDialog_open ( RscFileHandle  rFileH,
RscId  resourceId 
)

Opens a modal or modeless Dialog Box.

It returns immediately to its caller. Most modal dialogs should be opened with the mdlDialog_openModal function instead.

Parameters
[in]rFileHparameter specifies the resource file to search for the Dialog Box resource. If NULL, all the calling application's open resource files and then MicroStation's open resource files will be searched.
[in]resourceIdparameter specifies the resource ID of the Dialog Box resource that is used to create the Dialog Box. The Dialog Box will be modal if the DIALOGATTR_MODAL bit is set in the attributes field of the Dialog Box resource.
Returns
A pointer to the opened Dialog Box. NULL is returned if the Dialog Box resource was not found or errors occurred while loading the items contained in the Dialog Box.
See also
mdlDialog_openModal
Remarks
Required Library: mdlbltin.lib
int mdlDialog_openAlert ( WCharCP  stringP)

Opens a modal Dialog Box that contains two push buttons labeled OK and Cancel, and a multi-line label item that will be set to the string pointed to by stringP.

It does not return to its caller until the user closes the modal Dialog Box.

Parameters
[in]stringPstring to display alert
Remarks
This function is the same as mdlDialog_openInfoBox except that it also contains a Cancel button.
Returns
ACTIONBUTTON_OK or ACTIONBUTTON_CANCEL depending on whether the user activated the OK or Cancel push button to dismiss the Dialog Box.
See also
mdlDialog_openAlertById mdlDialog_openInfoBox
Remarks
Required Library: mdlbltin.lib
int mdlDialog_openAlertById ( RscId  dialogId,
WCharCP  stringP 
)

Opens an alternate alert dialog box.

The standard mdlDialog_openAlert function calls this routine with a dialog ID of DIALOGID_StandardAlert. An alternate alert Dialog Box must have, at a minimum, one multi-line text field (item index 0), an OK button and a Cancel button.

Parameters
[in]dialogIdis the ID of an alternate alert Dialog Box.
[in]stringPis the alert message to be displayed in the multi-line text field of the dialog.
Returns
ACTIONBUTTON_OK or ACTIONBUTTON_CANCEL, depending on whether the user activated the OK or Cancel push button to dismiss the dialog.
See also
mdlDialog_openAlert mdlDialog_openInfoBox
Remarks
Required Library: mdlbltin.lib
int mdlDialog_openInfoBox ( WCharCP  stringP)

Opens a modal Dialog Box that contains a single push button labeled OK, and a multi-line label item that will be set to the string pointed to by stringP.

It does not return to its caller until the user closes the modal dialog box.

Parameters
[in]stringPstring to display in info box
Remarks
This function is the same as mdlDialog_openAlert except that it does not contain a Cancel button.
Returns
ACTIONBUTTON_OK.
See also
mdlDialog_openAlert mdlDialog_openAlertById
int mdlDialog_openMessageBox ( RscId  dialogId,
WCharCP  stringP,
MessageBoxIconType  whichIcon 
)

Opens a modal Dialog Box which contains one to three push buttons, a multi-line label item, and one of four icons.

It does not return to its caller until the user closes the modal Dialog Box.

Parameters
[in]dialogIdis the ID of the message box which will be displayed, and will be used to specify which push buttons are included in the dialog. The following values for dialogId are available for use with mdlDialog_openMessageBox:
Value Description
DIALOGID_MsgBoxOK The message box contains one button: OK.
DIALOGID_MsgBoxOKCancel The message box contains two push buttons: OK and Cancel.
DIALOGID_MsgBoxYesNo The message box contains two push buttons: Yes and No.
DIALOGID_MsgBoxYesNoCancel The message box contains three push buttons: Yes, No and Cancel.
DIALOGID_MsgBoxYesAllNoCancel The message box contains four push buttons: Yes, Yes to All, No and Cancel.

mdlDialog_openMessageBox can also be used to display Icons in the following dialogs:
DIALOGID_StandardAlert
DIALOGID_MediumAlert
DIALOGID_LargeAlert
DIALOGID_StandardInfoBox
DIALOGID_MediumInfoBox
DIALOGID_LargeInfoBox
DIALOGID_YesNoCancelAlert

If, for example, you want to display a large information box, you can use:
mdlDialog_openMessageBox(DIALOGID_LargeInfoBox, stringP, MessageBoxIconType::Information);
[in]stringPis the multi line text string to be displayed as the alert message of the dialog.
[in]whichIconspecifies the raster icon to be drawn in the Dialog Box to the left of the alert message. mdlDialog_openMessageBox automatically detects the current GUIMODE and displays icons appropriate to Windows or Motif interface styles.:
whichIcon value Description
MessageBoxIconType::Information Provides information about the results of commands. Offers no user choices; user acknowledges message by pressing OK button. This means that the information symbol will nearly always appear in the MsgBoxOK dialog, i.e.,
mdlDialog_openMessageBox(DIALOGID_MsgBoxOK, stringP, MessageBoxIconType::Information);
MessageBoxIconType::Warning Alerts user to an error condition or situation that requires user decision and input before proceeding, such as an impending action with potentially destructive, irreversible consequences. The Message can be a question (for example, "Save changes to mechdrft.upf?").
MessageBoxIconType::Question Alerts user to an error condition or situation that requires user decision and input before proceeding, such as an impending action with potentially destructive, irreversible consequences. The Message can be a question (for example, "Save changes to mechdrft.upf?"). Some applications may find the question mark symbol more appropriate if the alert is in the form of a question. Note, however, that the question mark is also used as a help symbol and may therefore confuse users.
MessageBoxIconType::Critical Informs user of a serious system-related or application-related problem that must be corrected before work can continue with the application.

Returns
ACTIONBUTTON_OK, ACTIONBUTTON_CANCEL, etc. to indicate SUCCESS, or -1 if it fails.
See also
mdlDialog_openAlert mdlDialog_openAlertById mdlDialog_openInfoBox
StatusInt mdlDialog_openModal ( int *  lastActionTypeP,
RscFileHandle  rFileH,
RscId  resourceId 
)

Opens a modal Dialog Box.

It does not return to its caller until the user closes the modal Dialog Box.

Parameters
[in]rFileHparameter specifies the resource file to search for the Dialog Box resource. If NULL, all the calling application's open resource files and then MicroStation's open resource files will be searched.
[in]resourceIdparameter specifies the resource ID of the Dialog Box resource that is used to create the Dialog Box. Be sure to make the Dialog Box modal by setting the DIALOGATTR_MODAL bit in the attributes field of the Dialog Box resource.
Remarks
The only way that a user can close a modal Dialog Box is to activate either of the special push buttons which have IDs: PUSHBUTTONID_OK or ACTIONBUTTON_CANCEL. One of these must be included in any modal Dialog Box. Remember that the labels of these standard push buttons can be overridden as part of the item list specification. This allows the actions associated with clicking "OK" or "Cancel" in a modal Dialog Box to be performed by buttons that are labeled differently.
Parameters
[out]lastActionTypePparameter points to a variable that is set to indicate which push button the user used to close the modal Dialog Box. It will usually be set to ACTIONBUTTON_OK or ACTIONBUTTON_CANCEL.
Returns
SUCCESS, or ERROR if an error occurs. This means that the modal Dialog Box resource was not found, or errors occurred while loading the items contained in the modal Dialog Box.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_openModalWithMD ( int *  lastActionTypeP,
RscFileHandle  rFileH,
RscId  resourceId,
MdlDesc ownerMD 
)

An extension of mdlDialog_openModal which allows the caller to pass a MDL Descriptor of the owner task of the dialog.

Parameters
[out]lastActionTypePparameter points to a variable that is set to indicate which push button the user used to close the modal Dialog Box. It will be set to ACTIONBUTTON_OK or ACTIONBUTTON_CANCEL.
[in]rFileHparameter specifies the resource file to search for the Dialog Box resource. If NULL, all the calling application's open resource files and then MicroStation's open resource files will be searched.
[in]resourceIdparameter specifies the resource ID of the Dialog Box resource that is used to create the Dialog Box. Be sure to make the Dialog Box modal by setting the DIALOGATTR_MODAL bit in the attributes field of the Dialog Box resource.
[in]ownerMDMDL Descriptor of the owner task
Returns
SUCCESS, or ERROR if an error occurs. This means that the modal Dialog Box resource was not found, or errors occurred while loading the items contained in the modal Dialog Box.
See also
mdlDialog_openModal
Remarks
Required Library: mdlbltin.lib
MSDialogP mdlDialog_openWithMD ( RscFileHandle  rFileH,
MdlDescP  ownerMD,
RscId  resourceId 
)

An extension of mdlDialog_open which allows the caller to pass a MDL Descriptor of the owner task of the dialog.

Parameters
[in]rFileHparameter specifies the resource file to search for the Dialog Box resource. If NULL, all the calling application's open resource files and then MicroStation's open resource files will be searched.
[in]ownerMDMDL Descriptor of the owner task
[in]resourceIdparameter specifies the resource ID of the Dialog Box resource that is used to create the Dialog Box. The Dialog Box will be modal if the DIALOGATTR_MODAL bit is set in the attributes field of the Dialog Box resource.
Returns
A pointer to the opened Dialog Box. NULL is returned if the Dialog Box resource was not found or errors occurred while loading the items contained in the Dialog Box.
See also
mdlDialog_open
Remarks
Required Library: mdlbltin.lib
MdlDescP mdlDialog_ownerMDGet ( MSDialogP  dbP)

Returns the MDL descriptor of the task that owns the given Dialog Box.

Parameters
[in]dbPpoints to a Dialog Box from which the owning MDL task will be determined.
Returns
An MDL descriptor pointer or NULL.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_ownerMDSet ( MSDialogP  dbP,
MdlDescP  ownerMD 
)

Sets the MDL descriptor of the task that owns the given Dialog Box.

Parameters
[in]dbPpoints to a Dialog Box in which the owning MDL task will be set.
[in]ownerMDnew ownerMD of the owning MDL task
Returns
SUCCESS if dbP is valid.
Remarks
Required Library: mdlbltin.lib
int mdlDialog_parentIdGet ( MSDialogP  dbP)

Retrieves the resource ID of the parent of the specified Dialog Box.

Parameters
[in]dbPdialog whose parent ID is being found
Remarks
The mdlDialog_parentIdSet function sets the parent resource ID of the specified Dialog Box to be parentId.
The parent of a Dialog Box is usually specified in a Dialog Box resource specification. The parent Dialog Box's dialog hook function, if any, will be sent a DIALOG_MESSAGE_CHILDDESTROYED message when the child dialog box is closed.
Returns
The resource ID of the Dialog Box's parent Dialog Box. 0 is returned if dbP is not a pointer to a Dialog Box.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_parentIdSet ( MSDialogP  dbP,
long  parentId 
)

Sets the parent resource ID of the specified Dialog Box to be parentId.

Parameters
[in]dbPdialog whose parent ID is being set
[in]parentIdnew parent IS
Remarks
The parent of a Dialog Box is usually specified in a Dialog Box resource specification. The parent Dialog Box's dialog hook function, if any, will be sent a DIALOG_MESSAGE_CHILDDESTROYED message when the child dialog box is closed.
Returns
SUCCESS or ERROR. means that dbP is not a pointer to a Dialog Box.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_popupClose ( MSDialogP  dbP,
bool  bUpdate 
)

Closes a popup dialog in the proper manner.

If the popup is owned by a dialog item, that item will close the popup window.

Parameters
[in]dbPparameter indicates which popup Dialog Box to close.
[in]bUpdateIf the popup is owned by a dialog open, this indicates whether to update the item's value or discard the change.
Returns
SUCCESS, or ERROR if dbP is not a pointer to a Dialog Box.
Remarks
Required Library: mdlbltin.lib
MSDialog* mdlDialog_popupGetOwnerDialog ( MSDialogP  dbP)

Retrieves the owning dialog box which opened the popup window.

Parameters
[in]dbPparameter indicates which popup Dialog Box to obtain the owning dialog item for.
Returns
A pointer to the owning dialog box.
Remarks
Required Library: mdlbltin.lib
RawItemHdr* mdlDialog_popupGetOwnerItem ( MSDialogP  dbP)

Retrieves the owning dialog item which opened the popup window, if any.

Parameters
[in]dbPparameter indicates which popup Dialog Box to obtain the owning item item for.
Returns
A pointer to the owning dialog item.
Remarks
Required Library: mdlbltin.lib
void mdlDialog_refresh ( MSDialogP  dbP)

Refreshes the contents of a Dialog Box.

Remarks
Required Library: mdlbltin.lib
Parameters
[in]dbPis the dialog to refresh.
void mdlDialog_refreshNamedToolBox ( WCharCP  toolBoxPath)

Refreshes the context of a Named ToolBox.

Parameters
[in]toolBoxPathThe path of the Named Toolbox
Remarks
Required Library: mdlbltin.lib
void mdlDialog_sendMessagesOnUnload ( MdlDescP  mdlDescP,
bool  bValue 
)

Indicates whether the specified MDL application wishes to receive Dialog and Dialog Item messages when the application is unloading.

The default behavior is not to send these messages.

Parameters
[in]mdlDescPThe MDL Descriptor of the application
[in]bValuetrue indicates to send the messages when unloading.
Remarks
Required Library: mdlbltin.lib
void mdlDialog_setAdditionalAboutLegalText ( WCharCP  wText)

Sets additional text to appear in the About Box - "Legal and Patent Notices" section.

Parameters
[in]wTextUnicode text used as additional text for the About Box - "Legal and Patent Notices" section.
Remarks
The last call to this function sets the additional text appended to the product text. The additional legal text will appear at the bottom of the notices. Use (c) for Copyrights and (R) for Registered Trademarks rather than the special single-byte characters, which do not display correctly in multi-byte language environments.
Required Library: mdlbltin.lib
void mdlDialog_setAllowToolBoxOverrides ( bool  value)

Sets processing flag to allow for customized named ToolBoxes to override the original ToolBoxes when calling mdlDialog_find and mdlDialog_open functions.

Parameters
[in]valueWhen true, customized ToolBoxes can override delivered ToolBoxes by name
Remarks
Required Library: mdlbltin.lib
void mdlDialog_setAutoOpen ( MSDialogP  dbP,
bool  autoOpen 
)

Sets the dialog to Auto-Open.

Parameters
[in]dbPa pointer to the MSDialog
[in]autoOpentrue is the MSDialog is to be Auto-Open or false otherwise
Remarks
This property may also be set using the DIALOGATTR_AUTOOPEN dialog attribute in the resource definition.
See also
mdlDialog_setAutoOpenKeyin
Remarks
Required Library: mdlbltin.lib
void mdlDialog_setAutoOpenKeyin ( MSDialogP  dbP,
WCharCP  keyin 
)

Sets the Keyin to use when opening the dialog as Auto-Open.

In lieu of calling mdlDialog_autoOpen, this Keyin will be used to open the dialog when it is .NET Dockable.

Parameters
[in]dbPa pointer to the MSDialog
[in]keyinthe Keyin to use when opening the dialog as Auto-Open
See also
mdlDialog_setAutoOpen
Remarks
Required Library: mdlbltin.lib
void mdlDialog_setCacheName ( MSDialogP  dbP,
WCharCP  pName 
)

Sets the dialog's unique cache name.

This name should be static. When the dialog is dockable, the name is used by the dialog docking system to uniquely identify the dialog and is stored in the docking preferences file. The name may also be used in conjunction with EXTATTR_ITEMNAME for dialog items to set item values using the Key-in "set item dialogname.itemname=value". Spaces should not be included in this name.

Parameters
[in]dbPa pointer to the MSDialog
[in]pNamethe cache name for the MSDialog
Remarks
This name may also be set using the EXTATTR_DIALOGNAME extended dialog attribute in the resource definition.
Required Library: mdlbltin.lib
void mdlDialog_setCloseable ( MSDialogP  dbP,
bool  closeable 
)

Sets the Closeable property for a MSDialog.

Parameters
[in]dbPa pointer to the MSDialog
[in]closeableindicates whether the dialog can be closed
Remarks
The default for this property is TRUE. This property may also be set using the DIALOGATTR_UNCLOSEABLE dialog attribute in the resource definition. This function should be called in the DIALOG_MESSAGE_CREATE case. Otherwise, it will be called after window creation and will be too late to take effect.
Required Library: mdlbltin.lib
int mdlDialog_setFilterString ( WCharCP  filterString)

Sets the file filter string of a user-defined File Open or File Create Dialog Box.

This, in turn, will control the files that get displayed in the file name list box. This function must be called while the target Dialog Box is displayed on the screen (implying that the mdlDialog_setFilterString function call takes place from within a hook function of one of the dialog's items).

Parameters
[in]filterStringis a file filter, for example, "*.dgn".
Returns
SUCCESS if it can find the target dialog and change its filter string, otherwise it returns ERROR.
See also
mdlDialog_fileOpen mdlDialog_defFileOpen mdlDialog_fileCreate mdlDialog_defFileCreate
Remarks
Required Library: mdlbltin.lib
void mdlDialog_setFocusToHome ( )

Sets focus to the Home position.

Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_setNETDockingCanAutoHide ( MSDialogP  dbP,
bool  canAutoHide 
)

Sets the CanAutoHide property for a .NET Dockable MSDialog.

Parameters
[in]dbPThe .NET Dockable MSDialog
[in]canAutoHideindicates whether the dialog can be unpinned/pinned once it is docked
Remarks
The default for this property is TRUE. This function should be called in the DIALOG_MESSAGE_CREATED case. At this point, the dialog has been loaded into the Docking System and the WindowContent object has been created. Calling this function in the DIALOG_MESSAGE_CREATE case is too early.
Returns
SUCCESS if the dialog's autohide property was set, ERROR otherwise.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_setNETDockingMinimumSize ( MSDialogP  dbP,
int  width,
int  height 
)

Sets the MinimumSize property for a .NET Dockable MSDialog.

Parameters
[in]dbPThe .NET Dockable MSDialog
[in]widththe minimum width of the dialog
[in]heightthe minimum height of the dialog
Remarks
Required Library: mdlbltin.lib
Returns
SUCCESS if the dialog's minimum size was set, ERROR otherwise.
StatusInt mdlDialog_setNETDockingUndockable ( MSDialogP  dbP,
bool  undockable 
)

Sets the Undockable property for a .NET Dockable MSDialog.

Parameters
[in]dbPThe .NET Dockable MSDialog
[in]undockableindicates whether the dialog can be undocked once it is docked
Remarks
The default for this property is TRUE. This function should be called in the DIALOG_MESSAGE_CREATED case. At this point, the dialog has been loaded into the Docking System and the WindowContent object has been created. Calling this function in the DIALOG_MESSAGE_CREATE case is too early.
Returns
SUCCESS if the dialog's undockable property was set, ERROR otherwise.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_setParent ( MSDialogP  dbP,
MSDialogP  parentDbP 
)

Sets the parent dialog of a given child dialog.

Parameters
[in]dbPMSDialog to assign a parent for
[in]parentDbPparent MSDialog of dbP
Returns
SUCCESS, or ERROR on failure.
Remarks
Required Library: mdlbltin.lib
void mdlDialog_show ( MSDialogP  dbP)

Brings a Dialog Box back into view.

If the Dialog Box can accept input focus, focus is changed to the Dialog Box. If the Dialog Box is modal, the Dialog Box is raised to the top of the display and priority list and made the dominant window.

Parameters
[in]dbPMSDialog to show
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_synonymEnable ( int  synonymsId,
bool  enable 
)

Sets the enabled flag in all items in the synonym resource specified by synonymsId.

It does this for each occurrence of all the items in the list no matter what Dialog Box they appear in.

Parameters
[in]synonymsIdid of synonym resource to process
[in]enableindicates the new enabled status of the items.
Returns
SUCCESS, or ERROR if an error occurs. This means that the synonym resource could not be found.
See also
mdlDialog_synonymsDraw
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_synonymReloadData ( int  synonymsId,
bool  redraw 
)

Forces all items in the synonym resource specified by synonymsId to reload their data.

It does this for each occurrence of all the items in the list no matter what Dialog Box they appear in.

Parameters
[in]synonymsIdid of synonym resource to process
[in]redrawindicates whether to draw the item after the data reload.
Returns
SUCCESS, or ERROR if an error occurs. This means that the synonym resource could not be found.
See also
mdlDialog_synonymsDraw
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_synonymsDraw ( RscFileHandle  rFileH,
int  synonymsId,
MdlDescP  ownerMD 
)

Draws all items in the synonym resource specified by synonymsId.

It does this by calling the mdlDialog_itemDraw function for each occurrence of all the items in the list no matter what Dialog Box they appear in.

Parameters
[in]rFileHparameter specifies the resource file to search for the synonym resource. If NULL, all the calling application's open resource files and then MicroStation's open resource files will be searched.
[in]synonymsIdid of synonym resource to draw
[in]ownerMDparameter should be set to NULL.
Returns
SUCCESS, or ERROR if the synonym resource could not be found.
See also
mdlDialog_itemDraw
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_synonymSetVisibility ( int  synonymsId,
bool  visible 
)

Sets the visibility flag in all items in the synonym resource specified by synonymsId.

It does this for each occurrence of all the items in the list no matter what Dialog Box they appear in.

Parameters
[in]synonymsIdid of synonym resource to process
[in]visibleindicates the new visible status of the items.
Returns
SUCCESS, or ERROR if an error occurs. This means that the synonym resource could not be found.
See also
mdlDialog_synonymsDraw
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_synonymsSynch ( RscFileHandle  rFileH,
int  synonymsId,
MdlDescP  ownerMD 
)

Forces the appearance of all items in the synonym resource specified by synonymsId to match their external state.

It does this by calling the mdlDialog_itemSynch function for each occurrence of all the items in the list no matter what Dialog Box they appear in.

Parameters
[in]rFileHparameter specifies the resource file to search for the synonym resource. If NULL, all the calling application's open resource files and then MicroStation's open resource files will be searched.
[in]synonymsIdid of synonym resource to synch
[in]ownerMDparameter should be set to NULL.
Returns
SUCCESS, or ERROR if dbP is not a pointer to a Dialog Box. that the synonym resource could not be found.
See also
mdlDialog_itemsSynch mdlDialog_itemSynch
Remarks
Required Library: mdlbltin.lib
MSDialogP mdlDialog_toolBoxCmd ( RscFileHandle  rFileH,
MdlDescP  ownerMD,
RscId  resourceId,
WCharCP  unparsedCP 
)

Processes a 'DIALOG TOOLBOX' command.

Parameters
[in]rFileHparameter specifies the resource file to search for the Dialog Box resource. If NULL, all the calling application's open resource files and then MicroStation's open resource files will be searched.
[in]ownerMDMDL Descriptor of the owner task
[in]resourceIdparameter specifies the resource ID of the ToolBox resource.
[in]unparsedCPthe unparsed string from the command function. Valid values are NULL, "OPEN", "CLOSE" and "TOGGLE".
Returns
A pointer to the opened Dialog Box if the unparsed results in the ToolBox being opened.
Remarks
Required Library: mdlbltin.lib
UserDataP mdlDialog_userDataPtrGet ( MSDialogP  dbP)

Retrieves the user data pointer of the specified Dialog Box.

Parameters
[in]dbPDialog Box whose userDataPtr we're getting
Remarks
The user data pointer of a Dialog Box can be used to store a pointer to anything the MDL programmer wishes. The Dialog Box manager does not use it for any reason.
Returns
The user data pointer of the specified Dialog Box.
See also
mdlDialog_userDataPtrSet
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDialog_userDataPtrSet ( MSDialogP  dbP,
UserDataP  userDataP 
)

Sets the user data pointer of the specified Dialog Box to be userDataP.

Since the user data pointer is usually set indirectly by a dialog hook function upon receipt of the DIALOG_MESSAGE_CREATE message, the mdlDialog_userDataPtrSet function is rarely needed.

Parameters
[in]dbPDialog Box whose userDataPtr we're setting
[in]userDataPnew userDataP
Remarks
The user data pointer of a Dialog Box can be used to store a pointer to anything the MDL programmer wishes. The Dialog Box manager does not use it for any reason.
Returns
SUCCESS or ERROR. This means that dbP is not a pointer to a Dialog Box.
See also
mdlDialog_userDataPtrGet
Remarks
Required Library: mdlbltin.lib
RawItemHdrP mdlDialog_viewPopupMenuPGet ( int  buttonNum)

Retrieves the RawItemHdr pointer of the Popup Menu associated with a View window.

Parameters
[in]buttonNumthe RESET or TENTPNT button number
Returns
The RawItemHdr pointer of the Popup Menu associated with a View window.
Remarks
Required Library: mdlbltin.lib

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