Classes | Typedefs | Functions
Window Management

Classes

struct  WindowInfo
 WindowInfo maintains low-level information about a Microstation/PowerPlatform desktop-based window, such as next/previous window pointers, the Windows graphics handle, and the screen number. More...
 
struct  BaseWindow
 BaseWindow maintains low-level information about the state of a Microstation/PowerPlatform desktop-based window, such as display/minimized/maximized status, the global and content rectangle, docking position and priority and the title. More...
 
struct  MSWindow
 MSWindow is a base class for Microstation/PowerPlatform desktop-based windows, view windows and dialog boxes. More...
 
struct  guiwattributes
 The flags that control view and window attributes. More...
 

Typedefs

typedef struct guiwattributes GuiWAttributes
 The flags that control view and window attributes. More...
 

Functions

GuiWAttributesmdlWindow_attributesGet (MSWindowP windowP)
 Retrieves the GuiWAttributes for the Window. More...
 
StatusInt mdlWindow_changeScreen (MSWindowP windowP, int oldScreen, int newScreen, Point2dCP newGlobalOriginP, Point2dCP newContentExtentP, int leaveAtCurrentPriority)
 Moves the window specified by windowP from the screen indicated by oldScreen to the location specified by newGlobalOriginP (in global coordinates (0, 0) is top left hand corner of screen) on screen newScreen. More...
 
StatusInt mdlWindow_close (MSWindowP windowP, HideReasonCode reasonCode, bool bypassFocusOut)
 Closes the windows by hiding it then and deallocating it, invalidating windowP for any further mdlWindow_... More...
 
StatusInt mdlWindow_contentRectGetGlobal (BSIRectP contentRectP, MSWindowP windowP)
 Gets the content rectangle for a window in global coordinates. More...
 
StatusInt mdlWindow_contentRectGetLocal (BSIRectP contentRectP, MSWindowP windowP)
 Gets the content rectangle for a window in the window's local coordinates. More...
 
void mdlWindow_cursorTurnOff ()
 Turns off the cursor. More...
 
struct msDisplayDescrmdlWindow_displayDescrGet (MSWindowP windowP)
 Returns a pointer a display descriptor structure for a window. More...
 
StatusInt mdlWindow_drawWindowsIcon (MSWindowP windowP, WCharCP icoFileNameP, BSIRectCP imageRectP, BSIRectCP clipRectP, int style)
 Draws a Windows Icon to a window. More...
 
void mdlWindow_extentSet (MSWindowP windowP, int newWidth, int newHeight)
 Changes the window size specified in windowP. More...
 
void mdlWindow_findUsableSpace (BSIRectP useRectP, int iScreen, int iPriority)
 Gets a rectangle that represents the usable area of the screen. More...
 
int mdlWindow_float (MSWindowP windowP)
 Returns a window to its base priority. More...
 
void mdlWindow_flush (MSWindowP windowP)
 Ensures all graphic output is displayed on the screen. More...
 
int mdlWindow_getSelectedViewIndex ()
 Returns the 0-based index of the selected view window. More...
 
MSWindowP mdlWindow_getFirst ()
 Returns a pointer to the first window in the window list. More...
 
MSWindowP mdlWindow_getLast ()
 Returns a pointer to the last window in the window list. More...
 
MSWindowP mdlWindow_getNext (MSWindowP windowP)
 Returns a pointer to the next window in the window list, given a certain window pointer. More...
 
MSWindowP mdlWindow_getPrevious (MSWindowP windowP)
 Returns a pointer to the previous window in the window list, given a certain window pointer. More...
 
int mdlWindow_getState (void *outBufP, MSWindowP windowP, int paramNum)
 Retrieves different states of a window. More...
 
StatusInt mdlWindow_globalRectGetGlobal (BSIRectP rP, MSWindowP windowP)
 Gets the global rectangle for windowP in global coordinates. More...
 
StatusInt mdlWindow_globalRectGetLocal (BSIRectP rP, MSWindowP windowP)
 Gets the global rectangle for windowP in the window's local coordinates. More...
 
void mdlWindow_globalToContentRect (BSIRectP contentRectP, BSIRectCP globalRectP, int screen, GuiWAttributes const *attributesP)
 Determines what the content rectangle of a window will be when the global rectangle is known. More...
 
StatusInt mdlWindow_hide (MSWindowP windowP, HideReasonCode reasonCode, bool bypassFocusOut)
 Temporarily hides a window. More...
 
bool mdlWindow_isDialogBox (MSWindowP windowP)
 Determines whether the designated window is a dialog box. More...
 
bool mdlWindow_isNETDockable (MSWindowP windowP)
 Determines whether the designated window is has the .NET Dockable attribute. More...
 
bool mdlWindow_isNETDockableParent (MSWindowP windowP)
 Determines whether the designated window is a .NET Dockable parent window. More...
 
bool mdlWindow_isView (int *windowID, MSWindowP windowP)
 Determines whether the window specified by windowP is a MicroStation view window. More...
 
bool mdlWindow_isVisible (MSWindowP windowP)
 Determines whether a window is visible. More...
 
bool mdlWindow_isMinimized (MSWindowP windowP)
 Determines whether the specified window is minimized. More...
 
bool mdlWindow_isMaximized (MSWindowP windowP)
 Determines whether the specified window is maximized. More...
 
bool mdlWindow_isModal (MSWindowP windowP)
 Determines whether the specified window is modal. More...
 
int mdlWindow_maximize (MSWindowP windowP)
 Increases the size of the indicated window to its largest possible size. More...
 
int mdlWindow_minimize (MSWindowP windowP)
 Increases the size of the indicated window to its largest possible size. More...
 
void mdlWindow_pointToGlobal (Point2dP globalPtP, MSWindowP windowP, Point2dCP localPtP)
 Converts a point in local coordinates to a point in the global coordinates for the window specified in windowP. More...
 
void mdlWindow_screenPointToGlobal (Point2d *globalPtP, MSWindowP windowP, Point2dCP screenPtP)
 Converts a point in screen coordinates to a point in global coordinates for the screen number specified by windowP. More...
 
void mdlWindow_globalPointToScreen (Point2d *screenPtP, MSWindowP windowP, Point2dCP globalPtP)
 Converts a point in global coordinates to a point in screen coordinates for the screen number specified by windowP. More...
 
void mdlWindow_pointToLocal (Point2dP localPtP, MSWindowP windowP, Point2dCP globalPtP)
 Converts a point in global coordinates to a point in the local coordinates for the window specified in windowP. More...
 
StatusInt mdlWindow_resize (MSWindowP windowP, int cornerNum, Point2dCP newPositionP)
 Changes the size of the window specified by windowP. More...
 
StatusInt mdlWindow_restore (MSWindowP windowP)
 Returns the window to the size and position it occupied before a minimize or maximize operation. More...
 
int mdlWindow_screenNumGet (MSWindowP windowP)
 Returns the screen number that windowP is on. More...
 
WindowModifyFunc mdlWindow_setFunction (WindowModifyFunc function)
 Designates a function to be called whenever one of MicroStation's windows is modified. More...
 
StatusInt mdlWindow_setInputFocus (MSWindowP windowP, int explicitRequest, bool bypassFocusOut)
 Attempts to set the input focus to windowP. More...
 
void mdlWindow_setFocusToDefault ()
 Sets focus to the "default" window. More...
 
StatusInt mdlWindow_setSystemCursor (SYSTEMCURSOR systemCursor)
 Sets the mouse cursor to one of the system cursors defined in the SYSTEMCURSOR enum. More...
 
StatusInt mdlWindow_setCursorPrevious ()
 Sets the mouse cursor back to the cursor previous to when mdlWindow_setSystemCursor is called. More...
 
StatusInt mdlWindow_getTransparencyPercentage (int *piPercentage, MSWindowP windowP)
 Gets the transparency percentage level for a window. More...
 
StatusInt mdlWindow_setTransparencyPercentage (MSWindowP windowP, int iTransparency, bool bAllowComplete)
 Sets the transparency percentage level for a window. More...
 
MSWindowP mdlWindow_getInputFocus ()
 Finds a window which has input focus. More...
 
MSWindowP mdlWindow_getCurrentPopup ()
 Gets a pointer to the current popup window, if one is displayed. More...
 
StatusInt mdlWindow_show (MSWindowP windowP, bool noInitialUpdate)
 Shows a window, initially or after a hide operation. More...
 
StatusInt mdlWindow_showBalloonTooltip (WCharCP balloonText, DgnPlatform::OutputMessagePriority messageType, WCharCP titleText, Point2dCP pGlobalPoint, int screenNum, int closeDelay, bool bCloseButton, int iTransparency, RgbColorDefCP pTextColor, RgbColorDefCP pBgColor)
 Displays a Windows-style Balloon Tooltip window with an optional title and Close button. More...
 
StatusInt mdlWindow_closeBalloonTooltip ()
 Closes an open Windows-style Balloon Tooltip window. More...
 
StatusInt mdlWindow_setBalloonTooltipLinkFunction (MdlDescP tooltipLinkMDP, PFTooltipLink tooltipLinkFuncP)
 Sets up a callback function to call when an anchor () link is clicked in a Balloon Tooltip. More...
 
StatusInt mdlWindow_sink (MSWindowP windowP)
 Lowers a window's priority from its base to the lowest possible priority. More...
 
StatusInt mdlWindow_titleCopy (WCharP titleP, int titleChars, MSWindowP windowP)
 Retrieves the window's title specified by windowP into titleP as Unicode. More...
 
StatusInt mdlWindow_titleGet (WStringR title, MSWindowP windowP)
 Retrieves the window's title specified by windowP into a WString object. More...
 
StatusInt mdlWindow_titleSet (MSWindowP windowP, WCharCP title)
 Sets the window's title specified by titleP. More...
 
StatusInt mdlWindow_toBack (MSWindowP windowP)
 Moves the window to the back of its priority grouping. More...
 
StatusInt mdlWindow_toFront (MSWindowP windowP)
 Moves the window to the front of its priority grouping. More...
 
void mdlWindow_updateAllWindows (int systemOnly)
 Forces all open views and dialogs to be redrawn. More...
 
void mdlWindow_updateAllWindowsEx (int systemOnly, bool updateTitleAndIcon)
 Forces all open views and dialogs to be redrawn. More...
 
MSDialogmdlWindow_viewWindowGet (int viewNum)
 Retrieves a window pointer for one of MicroStation's views. More...
 
void mdlWindow_windowEventsProcessAll ()
 Forces all outstanding window events to be processed. More...
 
int mdlWindow_nativeWindowHandleGet (void *nativeHandleP, MSWindowP windowP, int type)
 Returns the native window identifier to the application. More...
 
void mdlWindow_checkWindowPositionFromScreenEx (MSWindowP windowP, BSIRectP pGlobalRect, bool *pbOffTop, bool *pbOffBottom, bool *pbOffLeft, bool *pbOffRight, int *piPastTop, int *piPastBottom, int *piPastLeft, int *piPastRight)
 Given proposed window bounds in screen coordinates, determines if and by how much the bounds exceed the physical monitor in which the window is located. More...
 
void mdlWindow_refreshRibbon ()
 Refresh the Ribbon by reloading its cached definition from rsc, XML, and Dgnlib files and then reloading the Workflows, Tabs, and Groups in the Ribbon. More...
 
void mdlWindow_refreshRibbonBackstage ()
 Refresh the Ribbon's backstage contents. More...
 
int mdlWindow_getStackingOrder (MSWindowP *windowPArray, int maxWindows, bool bViewsOnly, int screenNum)
 Returns the stacking order of windows on specified screen. More...
 

Detailed Description

Typedef Documentation

The flags that control view and window attributes.

Function Documentation

GuiWAttributes* mdlWindow_attributesGet ( MSWindowP  windowP)

Retrieves the GuiWAttributes for the Window.

Parameters
[in]windowPwindow whose GuiWAttributes we're retrieving
Returns
A pointer to the GuiWAttributes structure for the Window
See also
mdlWindow_globalToContentRect
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_changeScreen ( MSWindowP  windowP,
int  oldScreen,
int  newScreen,
Point2dCP  newGlobalOriginP,
Point2dCP  newContentExtentP,
int  leaveAtCurrentPriority 
)

Moves the window specified by windowP from the screen indicated by oldScreen to the location specified by newGlobalOriginP (in global coordinates (0, 0) is top left hand corner of screen) on screen newScreen.

The screen numbers used are indices into the graphConfig display descriptor table.

Parameters
[in]windowPwindow to resize
[in]oldScreenold screen number
[in]newScreennew screen number
[in]newGlobalOriginPnew global origin
[in]newContentExtentPdefines the extents to be used in the dialog box when it is placed on the new screen. If this parameter is NULL, the same extents as are defined for the dialog box on the old screen are used.
[in]leaveAtCurrentPriorityis not currently used.
See also
mdlWindow_contentRectGetGlobal mdlWindow_resize mdlWindow_extentSet
Returns
SUCCESS or ERROR
Remarks
Required Library: mdlbltin.lib
void mdlWindow_checkWindowPositionFromScreenEx ( MSWindowP  windowP,
BSIRectP  pGlobalRect,
bool *  pbOffTop,
bool *  pbOffBottom,
bool *  pbOffLeft,
bool *  pbOffRight,
int *  piPastTop,
int *  piPastBottom,
int *  piPastLeft,
int *  piPastRight 
)

Given proposed window bounds in screen coordinates, determines if and by how much the bounds exceed the physical monitor in which the window is located.

Parameters
[in]windowPParent window
[in]pGlobalRectGlobal rect of proposed window
[out]pbOffTopAbove the top
[out]pbOffBottomBelow the bottom
[out]pbOffLeftBeyond the left
[out]pbOffRightBeyond the right
[out]piPastTopAmount past top
[out]piPastBottomAmount past bottom
[out]piPastLeftAmount past left
[out]piPastRightAmount past right
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_close ( MSWindowP  windowP,
HideReasonCode  reasonCode,
bool  bypassFocusOut 
)

Closes the windows by hiding it then and deallocating it, invalidating windowP for any further mdlWindow_...

operations.

Parameters
[in]windowPwindow to close
[in]reasonCodeA code from the HideReasonCode enum found in dlogitem.h.
[in]bypassFocusOutbypass the focus out
Returns
SUCCESS or ERROR An error may be caused if the window pointer passed in is invalid or the window refused to relinquish focus and bypassFocusOut is false.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_closeBalloonTooltip ( )

Closes an open Windows-style Balloon Tooltip window.

Returns
SUCCESS, or non-zero if error occurred.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_contentRectGetGlobal ( BSIRectP  contentRectP,
MSWindowP  windowP 
)

Gets the content rectangle for a window in global coordinates.

Remarks
In MicroStation, each window has an associated content and global rectangle. The content rectangle is the window portion on which the application draws. The global rectangle includes the window's content rectangle and borders and title rectangle. The mdlWindow_contentRectGetLocal and mdlWindow_contentRectGetGlobal functions get the content rectangle for windowP, and mdlWindow_globalRectGetLocal and mdlWindow_globalRectGetGlobal are used to get the global rectangle for windowP. The mdlWindow_...RectGetLocal routines return the rectangle in local coordinates, while the mdlWindow_...RectGetGlobal routines return the same information in global coordinates.
Parameters
[out]contentRectPcontent rect in global coords
[in]windowPwindow to get content rect for
Returns
SUCCESS or ERROR
See also
mdlWindow_contentRectGetLocal mdlWindow_globalRectGetLocal mdlWindow_globalRectGetGlobal
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_contentRectGetLocal ( BSIRectP  contentRectP,
MSWindowP  windowP 
)

Gets the content rectangle for a window in the window's local coordinates.

Remarks
In MicroStation, each window has an associated content and global rectangle. The content rectangle is the window portion on which the application draws. The global rectangle includes the window's content rectangle and borders and title rectangle. The mdlWindow_contentRectGetLocal and mdlWindow_contentRectGetGlobal functions get the content rectangle for windowP, and mdlWindow_globalRectGetLocal and mdlWindow_globalRectGetGlobal are used to get the global rectangle for windowP. The mdlWindow_...RectGetLocal routines return the rectangle in local coordinates, while the mdlWindow_...RectGetGlobal routines return the same information in global coordinates.
Parameters
[out]contentRectPcontent rect in global coords
[in]windowPwindow to get content rect for
Returns
SUCCESS or ERROR
See also
mdlWindow_contentRectGetGlobal mdlWindow_globalRectGetLocal mdlWindow_globalRectGetGlobal
Remarks
Required Library: mdlbltin.lib
void mdlWindow_cursorTurnOff ( )

Turns off the cursor.

This must be done before you begin to draw in a window. You never need to turn the cursor back on, since MicroStation will do this the next time it undergoes its input loop.

struct msDisplayDescr* mdlWindow_displayDescrGet ( MSWindowP  windowP)

Returns a pointer a display descriptor structure for a window.

Remarks
MicroStation maintains a structure (called the display descriptor) for each screen in the system. The mdlWindow_displayDescrGet function returns a pointer to this structure for the screen that windowP is on. From the display descriptor, which is defined in global.h as MSDisplayDescr, information about the screen resolution and the number of colors the screen supports can be obtained.
Parameters
[in]windowPwindow to display discriptor for
Returns
A pointer to the display descriptor for the screen that the specified window is on.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_drawWindowsIcon ( MSWindowP  windowP,
WCharCP  icoFileNameP,
BSIRectCP  imageRectP,
BSIRectCP  clipRectP,
int  style 
)

Draws a Windows Icon to a window.

Parameters
[in]windowPwindow to draw to
[in]icoFileNamePname of the ICO to draw, without the path and the .ICO extension
[in]imageRectPportion of the window to update, in local coordinates
[in]clipRectPclipping rectangle
[in]styleOne of the ICON_STYLE_ definitions
Returns
SUCCESS, or ERROR if an error occurs.
Remarks
Required Library: mdlbltin.lib
void mdlWindow_extentSet ( MSWindowP  windowP,
int  newWidth,
int  newHeight 
)

Changes the window size specified in windowP.

It lets you specify a new width and height for the window in newWidth and newHeight, respectively. Normally, the window resizes by moving its lower right corner. However, if the DIALOGATTR_RESIZESINWARD attribute is used, the appropriate corner will be moved to size the window toward the center of the screen.

Parameters
[in]windowPwindow to resize
[in]newWidthnew window width
[in]newHeightnew window height
See also
mdlWindow_contentRectGetGlobal
Remarks
Required Library: mdlbltin.lib
void mdlWindow_findUsableSpace ( BSIRectP  useRectP,
int  iScreen,
int  iPriority 
)

Gets a rectangle that represents the usable area of the screen.

Parameters
[out]useRectPpoints to the usable area rectangle.
[in]iScreenan integer indicating which screen to get the area of.
[in]iPriorityan integer indicating the minimum priority of windows to check
Remarks
Required Library: mdlbltin.lib
int mdlWindow_float ( MSWindowP  windowP)

Returns a window to its base priority.

The window is specified with windowP. Each MicroStation window has an associated base priority. All dialog boxes are grouped into the same priority, and their base priority is higher than the base priority of graphic windows.

Parameters
[in]windowPwindow to float
Returns
SUCCESS, or true if an error occurs.
See also
mdlWindow_toFront mdlWindow_toBack
Remarks
Required Library: mdlbltin.lib
void mdlWindow_flush ( MSWindowP  windowP)

Ensures all graphic output is displayed on the screen.

On some platforms, graphic output is buffered, rather than going to the screen immediately. To ensure that the screen is displaying all graphics that were drawn with the mdlWindow calls, the mdlWindow_flush function is used.

Parameters
[in]windowPwindow to flush. To flush buffers for all windows, windowP can be NULL.
Remarks
Required Library: mdlbltin.lib
MSWindowP mdlWindow_getCurrentPopup ( )

Gets a pointer to the current popup window, if one is displayed.

Returns
A pointer to the popup window if one exists, or NULL if none is displayed.
Remarks
Required Library: mdlbltin.lib
MSWindowP mdlWindow_getFirst ( )

Returns a pointer to the first window in the window list.

Remarks
The mdlWindow_getFirst and mdlWindow_getNext functions are used together to "walk through" all MicroStation windows. The program first calls mdlWindow_getFirst to get the first window in the list, and then repeatedly calls mdlWindow_getNext to get all the other windows. The current parameter must be the return value from mdlWindow_getFirst or mdlWindow_getNext.
A loop that processes all windows can be coded:
MSWindow *current;
for (current=mdlWindow_getFirst(); current;
current=mdlWindow_getNext(current))
process window here
Returns
A pointer to an MSWindow. When there are no more windows, a NULL pointer is returned.
Remarks
Required Library: mdlbltin.lib
MSWindowP mdlWindow_getInputFocus ( )

Finds a window which has input focus.

Returns
A pointer to the window in focus, or NULL if no window has input focus.
See also
mdlWindow_setInputFocus
Remarks
Required Library: mdlbltin.lib
MSWindowP mdlWindow_getLast ( )

Returns a pointer to the last window in the window list.

Remarks
mdlWindow_getLast and mdlWindow_getPrevious are used together to traverse MicroStation's linked list of windows. The mdlWindow_getLast routine will return the most recently created window. The window returned from it can then be used as the argument to mdlWindow_getPrevious to continue traversing the windows. Except in special circumstances the mdlWindow_getFirst and mdlWindow_getNext functions are generally used to traverse the window list.
Returns
A pointer to an MSWindow. When there are no more windows, NULL is returned.
See also
mdlWindow_getFirst mdlWindow_getNext
Remarks
Required Library: mdlbltin.lib
MSWindowP mdlWindow_getNext ( MSWindowP  windowP)

Returns a pointer to the next window in the window list, given a certain window pointer.

Parameters
[in]windowPwindow to get next
Remarks
The mdlWindow_getFirst and mdlWindow_getNext functions are used together to "walk through" all MicroStation windows. The program first calls mdlWindow_getFirst to get the first window in the list, and then repeatedly calls mdlWindow_getNext to get all the other windows. The current parameter must be the return value from mdlWindow_getFirst or mdlWindow_getNext.
A loop that processes all windows can be coded: MSWindow *current; for (current=mdlWindow_getFirst(); current; current=mdlWindow_getNext(current)) process window here
Returns
A pointer to an MSWindow. When there are no more windows, a NULL pointer is returned.
Remarks
Required Library: mdlbltin.lib
MSWindowP mdlWindow_getPrevious ( MSWindowP  windowP)

Returns a pointer to the previous window in the window list, given a certain window pointer.

Parameters
[in]windowPcurrent window
Remarks
mdlWindow_getLast and mdlWindow_getPrevious are used together to traverse MicroStation's linked list of windows. The mdlWindow_getLast routine will return the most recently created window. The window returned from it can then be used as the argument to mdlWindow_getPrevious to continue traversing the windows. Except in special circumstances the mdlWindow_getFirst and mdlWindow_getNext functions are generally used to traverse the window list.
Returns
A pointer to an MSWindow. When there are no more windows, NULL is returned.
See also
mdlWindow_getFirst mdlWindow_getNext
Remarks
Required Library: mdlbltin.lib
int mdlWindow_getSelectedViewIndex ( )

Returns the 0-based index of the selected view window.

Clicking on the title bar of a view window or a data point or tentative point within a view window will select the view.

Returns
The 0-based index of the selected view window.
int mdlWindow_getStackingOrder ( MSWindowP *  windowPArray,
int  maxWindows,
bool  bViewsOnly,
int  screenNum 
)

Returns the stacking order of windows on specified screen.

Parameters
[in]windowPArraylist of windows from front to back; set to NULL to return count only
[in]maxWindowsmax number of entries available in windowPArray
[in]bViewsOnlytrue = consider view windows only
[in]screenNumscreen number
Returns
Number of windows returned
Remarks
Required Library: mdlbltin.lib
int mdlWindow_getState ( void *  outBufP,
MSWindowP  windowP,
int  paramNum 
)

Retrieves different states of a window.

Parameters
[out]outBufPthe buffer receiving the state of the window
[in]windowPthe window to process
[in]paramNumthe number of the state to retrieve. See ids beginning with WINDOWGETSTATE_ in MstnDefs.h for valid state numbers.
Returns
SUCCESS, or ERROR if the windowP or paramNum parameters are invalid
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_getTransparencyPercentage ( int *  piPercentage,
MSWindowP  windowP 
)

Gets the transparency percentage level for a window.

Parameters
[in]piPercentageReceives the transparency percentage level for the window. A value of 0 indicates no transparency (opaque), while a value of 100 indicates complete transparency.
[in]windowPwindow to get transparency percentage for
Returns
SUCCESS, or ERROR if the system cannot get the transparency for the window
Remarks
Required Library: mdlbltin.lib
void mdlWindow_globalPointToScreen ( Point2d *  screenPtP,
MSWindowP  windowP,
Point2dCP  globalPtP 
)

Converts a point in global coordinates to a point in screen coordinates for the screen number specified by windowP.

The input point in global coordinates is specified by globalPtP. The output point in screen coordinates is returned in screenPtP. When globalPtP is NULL, mdlWindow_globalPointToScreen converts the output argument in place, using screenPtP as both the input and output.

Parameters
[in,out]screenPtPPoint in screen coordinates.
[in]windowPWindow to get screen number from.
[in]globalPtPPoint in global coordinates.
See also
mdlWindow_screenPointToGlobal
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_globalRectGetGlobal ( BSIRectP  rP,
MSWindowP  windowP 
)

Gets the global rectangle for windowP in global coordinates.

Remarks
In MicroStation, each window has an associated content and global rectangle. The content rectangle is the window portion on which the application draws. The global rectangle includes the window's content rectangle and borders and title rectangle. The mdlWindow_contentRectGetLocal and mdlWindow_contentRectGetGlobal functions get the content rectangle for windowP, and mdlWindow_globalRectGetLocal and mdlWindow_globalRectGetGlobal are used to get the global rectangle for windowP. The mdlWindow_...RectGetLocal routines return the rectangle in local coordinates, while the mdlWindow_...RectGetGlobal routines return the same information in global coordinates.
Parameters
[out]rPcontent rect in global coords
[in]windowPwindow to get content rect for
Returns
SUCCESS, or true if an error occurs.
See also
mdlWindow_contentRectGetLocal mdlWindow_globalRectGetLocal mdlWindow_contentRectGetGlobal
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_globalRectGetLocal ( BSIRectP  rP,
MSWindowP  windowP 
)

Gets the global rectangle for windowP in the window's local coordinates.

Remarks
In MicroStation, each window has an associated content and global rectangle. The content rectangle is the window portion on which the application draws. The global rectangle includes the window's content rectangle and borders and title rectangle. The mdlWindow_contentRectGetLocal and mdlWindow_contentRectGetGlobal functions get the content rectangle for windowP, and mdlWindow_globalRectGetLocal and mdlWindow_globalRectGetGlobal are used to get the global rectangle for windowP. The mdlWindow_...RectGetLocal routines return the rectangle in local coordinates, while the mdlWindow_...RectGetGlobal routines return the same information in global coordinates.
Parameters
[out]rPcontent rect in global coords
[in]windowPwindow to get content rect for
Returns
SUCCESS, or nonzero value if an error occurs.
See also
mdlWindow_contentRectGetLocal mdlWindow_globalRectGetGlobal mdlWindow_contentRectGetGlobal
Remarks
Required Library: mdlbltin.lib
void mdlWindow_globalToContentRect ( BSIRectP  contentRectP,
BSIRectCP  globalRectP,
int  screen,
GuiWAttributes const *  attributesP 
)

Determines what the content rectangle of a window will be when the global rectangle is known.

Remarks
Using this function, an application can determine how it wants to move or resize the window's content rectangle to cause it to fill a particular portion of the screen. This function is not generally used to obtain the current content rectangle of an existing window, which can be more conveniently determined by using mdlWindow_contentRectGetGlobal.
Parameters
[out]contentRectPpoints to a BSIRectangle structure that is used to hold the output, which is returned in global coordinates.
[in]globalRectPpoints to a global rectangle that is used as an input.
[in]screenindicates the screen that the window is on. It should be either 0 or 1.
[in]attributesPpoints to a GuiWAttribute structure that defines window attributes for the window. The size difference between the global and content rectangles for a window is determined by whether or not the window is resizable, among other things.
See also
mdlWindow_contentRectGetGlobal
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_hide ( MSWindowP  windowP,
HideReasonCode  reasonCode,
bool  bypassFocusOut 
)

Temporarily hides a window.

Remarks
The mdlWindow_show function brings it back into view. The mdlWindow_close function hides the window and deallocates it, invalidating windowP for any further mdlWindow_... operations.
Parameters
[in]windowPwindow to hide
[in]reasonCodereason code for hiding the window - HideReasonCode found in dlogitem.h.
[in]bypassFocusOutbypass the focus out, usu. false
Returns
SUCCESS, or ERROR if the window pointer passed in is invalid or the window refused to relinquish focus and bypassFocusOut is false.
See also
mdlWindow_show
Remarks
Required Library: mdlbltin.lib
bool mdlWindow_isDialogBox ( MSWindowP  windowP)

Determines whether the designated window is a dialog box.

Parameters
[out]windowPis the window to test.
Returns
true if windowP is a dialog box, or false if it is not.
Remarks
Required Library: mdlbltin.lib
bool mdlWindow_isMaximized ( MSWindowP  windowP)

Determines whether the specified window is maximized.

Parameters
[in]windowPpoints to the window to query.
Returns
true if the given window is maximized, false if it is not maximized.
Remarks
Required Library: mdlbltin.lib
bool mdlWindow_isMinimized ( MSWindowP  windowP)

Determines whether the specified window is minimized.

Parameters
[in]windowPpoints to the window to query.
Returns
true if the given window is minimized, false if it is not minimized.
Remarks
Required Library: mdlbltin.lib
bool mdlWindow_isModal ( MSWindowP  windowP)

Determines whether the specified window is modal.

Parameters
[in]windowPpoints to the window to query.
Returns
true if the given window is modal, false if it is not.
Remarks
Required Library: mdlbltin.lib
bool mdlWindow_isNETDockable ( MSWindowP  windowP)

Determines whether the designated window is has the .NET Dockable attribute.

Parameters
[out]windowPis the window to test.
Returns
true if windowP is .NET Dockable, or false if it is not.
Remarks
Required Library: mdlbltin.lib
bool mdlWindow_isNETDockableParent ( MSWindowP  windowP)

Determines whether the designated window is a .NET Dockable parent window.

Parameters
[out]windowPis the window to test.
Returns
true if windowP is a .NET Dockable parent window, or false if it is not.
Remarks
Required Library: mdlbltin.lib
bool mdlWindow_isView ( int *  windowID,
MSWindowP  windowP 
)

Determines whether the window specified by windowP is a MicroStation view window.

If the window is a view, and viewIndexP is not NULL, then integer pointed to by viewIndexP is set to the view index (0 through 7).

Parameters
[out]windowIDview index
[in]windowPwindow to test
Returns
true if the window tested is a view, or false otherwise.
Remarks
Required Library: mdlbltin.lib
bool mdlWindow_isVisible ( MSWindowP  windowP)

Determines whether a window is visible.

Parameters
[in]windowPwindow to test for visibility
Returns
true if the window is visible, or false if it is not.
Remarks
Required Library: mdlbltin.lib
int mdlWindow_maximize ( MSWindowP  windowP)

Increases the size of the indicated window to its largest possible size.

Similarly, mdlWindow_minimize decreases the size of the indicated window to its smallest possible size. If a window has been minimized or maximized, mdlWindow_restore returns the window to the size and position it occupied before the size-changing operation.

Remarks
Only windows that are resizable can be minimized or maximized, and only windows that have been minimized or maximized (with no intervening size changes) can be restored.
Parameters
[in]windowPparameter designates the window that is to be minimized, maximized or restored.
Returns
SUCCESS, or true on error. Failure will occur if windowP is not a valid, sizable window.
See also
mdlWindow_resize mdlWindow_extentSetC
Remarks
Required Library: mdlbltin.lib
int mdlWindow_minimize ( MSWindowP  windowP)

Increases the size of the indicated window to its largest possible size.

Similarly, mdlWindow_minimize decreases the size of the indicated window to its smallest possible size. If a window has been minimized or maximized, mdlWindow_restore returns the window to the size and position it occupied before the size-changing operation.

Remarks
Only windows that are resizable can be minimized or maximized, and only windows that have been minimized or maximized (with no intervening size changes) can be restored.
Parameters
[in]windowPparameter designates the window that is to be minimized, maximized or restored.
Returns
SUCCESS, true on error. Failure will occur if windowP is not a valid, sizable window.
See also
mdlWindow_resize mdlWindow_extentSet
Remarks
Required Library: mdlbltin.lib
int mdlWindow_nativeWindowHandleGet ( void *  nativeHandleP,
MSWindowP  windowP,
int  type 
)

Returns the native window identifier to the application.

This value is never used as an argument to any MDL built-in function, but some DLMs will be able to use it.

Remarks
Any code that makes use of this function will generally not be easily ported from one MicroStation platform to another.
Parameters
[out]nativeHandlePpoints to memory in the application program that the function will fill in with the native window identifier. The type of handle returned by this function is determined by type as follows: Platform / Value of type / Type of handle returned; MSDOS 0 int; Environ V 0 int Macintosh 0 WindowPtr ; X Window HANDLETYPE_WINDOW HANDLETYPE_DISPLAY HANDLETYPE_XVISUALINFO Window Display * XVisualInfo; Windows NT HANDLETYPE_WINDOW HANDLETYPE_HDC HANDLETYPE_BSHDC HANDLETYPE_BSHBITMAP HWND HDC (onscreen window) HDC (for backstore) HBITMAP (for backstore)
[in]windowPwindow to get handle for
[in]typetype of handle (NT only)
Returns
The native window identifier associated with windowP. If mdlWindow_nativeWindowHandleGet returns NULL for HANDLETYPE_BSHDC or HANDLETYPE_BSHBITMAP, the window has no backing store.
Remarks
Required Library: mdlbltin.lib
void mdlWindow_pointToGlobal ( Point2dP  globalPtP,
MSWindowP  windowP,
Point2dCP  localPtP 
)

Converts a point in local coordinates to a point in the global coordinates for the window specified in windowP.

The input point in local coordinates is specified by localPtP. The output point in global coordinates is returned in globalPtP. When localPtP is NULL, mdlWindow_pointToGlobal converts the output argument in place, using globalPtP as both the input and output. mdlWindow_pointToLocal is the inverse function.

Parameters
[in,out]globalPtPPoint in global coordinates.
[in]windowPWindow to get coords for.
[in]localPtPPoint in local coordinates.
See also
mdlWindow_pointToLocal
Remarks
Required Library: mdlbltin.lib
void mdlWindow_pointToLocal ( Point2dP  localPtP,
MSWindowP  windowP,
Point2dCP  globalPtP 
)

Converts a point in global coordinates to a point in the local coordinates for the window specified in windowP.

The input point in global coordinates is specified by globalPtP. The output point in local coordinates is returned in localPtP. When globalPtP is NULL, mdlWindow_pointToLocal converts the output argument in place, using localPtP as both the input and output. mdlWindow_pointToGlobal is the inverse function.

Parameters
[in,out]localPtPPoint in local coordinates.
[in]windowPWindow to get coords for.
[in]globalPtPPoint in global coordinates.
See also
mdlWindow_pointToGlobal
Remarks
Required Library: mdlbltin.lib
void mdlWindow_refreshRibbon ( )

Refresh the Ribbon by reloading its cached definition from rsc, XML, and Dgnlib files and then reloading the Workflows, Tabs, and Groups in the Ribbon.

Remarks
Required Library: mdlbltin.lib
void mdlWindow_refreshRibbonBackstage ( )

Refresh the Ribbon's backstage contents.

This does not reload the the ribbon definition cache.

StatusInt mdlWindow_resize ( MSWindowP  windowP,
int  cornerNum,
Point2dCP  newPositionP 
)

Changes the size of the window specified by windowP.

Remarks
Both mdlWindow_resize and mdlWindow_extentSet functions change the window size. mdlWindow_extentSet is the simpler of the two routines. It lets you specify a new height and width for the window. However, the mdlWindow_resize function is more flexible. With it, any corner can be moved, or the entire window can be moved without a size change. Specify the corner by setting cornerNum to CORNER_UPPERLEFT, CORNER_LOWERLEFT, CORNER_LOWERRIGHT, CORNER_UPPERRIGHT or CORNER_ALL. The new position of the specified corner of the window's content rectangle (in global coordinates) is specified in newPosP. If cornerNum is set to CORNER_ALL, newPosP is the new position of the upper left corner.
Parameters
[in]windowPwindow to resize
[in]cornerNumcorner to move
[in]newPositionPnew postion for corner
Returns
SUCCESS or ERROR ig windowP is not a valid, sizable window.
See also
mdlWindow_contentRectGetGlobal
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_restore ( MSWindowP  windowP)

Returns the window to the size and position it occupied before a minimize or maximize operation.

Remarks
The mdlWindow_maximize function increases the size of the indicated window to its largest possible size. Similarly, mdlWindow_minimize decreases the size of the indicated window to its smallest possible size. If a window has been minimized or maximized, mdlWindow_restore returns the window to the size and position it occupied before the size-changing operation.
Only windows that are resizable can be minimized or maximized, and only windows that have been minimized or maximized (with no intervening size changes) can be restored.
Parameters
[in]windowPparameter designates the window that is to be minimized, maximized or restored.
Returns
SUCCESS on success, or true if it fails. Failure will occur if windowP is not a valid, sizable window.
See also
mdlWindow_resize mdlWindow_extentSetC
Remarks
Required Library: mdlbltin.lib
int mdlWindow_screenNumGet ( MSWindowP  windowP)

Returns the screen number that windowP is on.

Parameters
[in]windowPwindow to get screen number for
Returns
The screen number.
See also
mdlWindow_displayDescrGet
Remarks
Required Library: mdlbltin.lib
void mdlWindow_screenPointToGlobal ( Point2d *  globalPtP,
MSWindowP  windowP,
Point2dCP  screenPtP 
)

Converts a point in screen coordinates to a point in global coordinates for the screen number specified by windowP.

The input point in screen coordinates is specified by screenPtP. The output point in global coordinates is returned in globalPtP. When screenPtP is NULL, mdlWindow_screenPointToGlobal converts the output argument in place, using globalPtP as both the input and output.

Parameters
[in,out]globalPtPPoint in global coordinates.
[in]windowPWindow to get screen number from.
[in]screenPtPPoint in screen coordinates.
See also
mdlWindow_globalPointToScreen
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_setBalloonTooltipLinkFunction ( MdlDescP  tooltipLinkMDP,
PFTooltipLink  tooltipLinkFuncP 
)

Sets up a callback function to call when an anchor () link is clicked in a Balloon Tooltip.

Parameters
[in]tooltipLinkMDPMdlDesc of the call back function. NULL indicates the current task.
[in]tooltipLinkFuncPThe function to call
Returns
SUCCESS, or non-zero if error occurred.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_setCursorPrevious ( )

Sets the mouse cursor back to the cursor previous to when mdlWindow_setSystemCursor is called.

Returns
SUCCESS, or ERROR if the cursor could not be set
Remarks
Required Library: mdlbltin.lib
void mdlWindow_setFocusToDefault ( )

Sets focus to the "default" window.

WindowModifyFunc mdlWindow_setFunction ( WindowModifyFunc  function)

Designates a function to be called whenever one of MicroStation's windows is modified.

A common usage is to detect when a window is made smaller, since in cases where the contents do not need to be resized there is no update event and it is consequently impossible to catch such window size changes.

Parameters
[in]functionThe functionP parameter designates the function that should be called when the window is modified. If functionP is NULL, modifications are no longer processed by the application.
Returns
A pointer to the user function that was previously set using mdlWindow_setFunction.
See also
userWindow_modifyEvents
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_setInputFocus ( MSWindowP  windowP,
int  explicitRequest,
bool  bypassFocusOut 
)

Attempts to set the input focus to windowP.

Parameters
[in]windowPwindow to receive input focus
[in]explicitRequestshould always be set to true, because the call will not be in response to a user button event.
[in]bypassFocusOutshould only be set to true if the focus is to be changed to the specified window regardless of whether the current focus window wants to relinquish the focus. Dialog boxes, for example, refuse to relinquish the focus if the item focus is set to a text item, and the input currently in the text item is invalid. In general, MDL programs should set this argument to false, to make sure they are cooperative with other applications.
Returns
SUCCESS, or a non-zero value if the system cannot set the focus to the specified window.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_setSystemCursor ( SYSTEMCURSOR  systemCursor)

Sets the mouse cursor to one of the system cursors defined in the SYSTEMCURSOR enum.

Parameters
[in]systemCursorone of the SYSTEMCURSOR enum values.
Returns
SUCCESS, or ERROR if the cursor could not be set
Remarks
Saves the previous cursor so it can be restored using mdlWindow_setCursorPrevious.
Required Library: mdlbltin.lib
StatusInt mdlWindow_setTransparencyPercentage ( MSWindowP  windowP,
int  iTransparency,
bool  bAllowComplete 
)

Sets the transparency percentage level for a window.

Parameters
[in]windowPwindow to set transparency percentage for
[in]iTransparencytransparency percentage level for the window. A value of 0 indicates no transparency (opaque), while a value of 100 indicates complete transparency.
[in]bAllowCompleteIndicates whether to allow complete transparency, even if 100% is specified.
Returns
SUCCESS, or ERROR if the system cannot set the transparency for the window
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_show ( MSWindowP  windowP,
bool  noInitialUpdate 
)

Shows a window, initially or after a hide operation.

Remarks
The mdlWindow_hide function temporarily hides windowP. The mdlWindow_show function brings it back into view. The mdlWindow_close function hides the window and deallocates it, invalidating windowP for any further mdlWindow_... operations.
Parameters
[in]windowPwindow
[in]noInitialUpdatefor mdlWindow_show inhibits the first refresh message normally sent in a window when it is first displayed. Generally, this argument should be set to false.
Returns
SUCCESS, or ERROR if the window pointer passed in is invalid.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_showBalloonTooltip ( WCharCP  balloonText,
DgnPlatform::OutputMessagePriority  messageType,
WCharCP  titleText,
Point2dCP  pGlobalPoint,
int  screenNum,
int  closeDelay,
bool  bCloseButton,
int  iTransparency,
RgbColorDefCP  pTextColor,
RgbColorDefCP  pBgColor 
)

Displays a Windows-style Balloon Tooltip window with an optional title and Close button.

Parameters
[in]balloonTextText for the Balloon Tooltip
[in]messageTypeType and icon for message: 0 (no icon), MESSAGE_FO, MESSAGE_WARNG, OutputMessagePriority::Error
[in]titleTextTitle text for the window; may be NULL for no title or icon
[in]pGlobalPointPoint, in global coords, of pointer for the window
[in]screenNumNumber of application screen
[in]closeDelayTime, in milliseconds, to display the window before auto-closing. A value of 0 turns off auto-close.
[in]bCloseButtonIndicates whether or not to include a Close button
[in]iTransparencyThe amount of window transparency; 0 is opaque, 100 is fully transparent
[in]pTextColorRGB value for the text color; specify NULL to use the Windows tooltip default
[in]pBgColorRGB value for the background color; specify NULL to use the Windows tooltip default
Returns
SUCCESS, or non-zero if error occurred.
StatusInt mdlWindow_sink ( MSWindowP  windowP)

Lowers a window's priority from its base to the lowest possible priority.

Each MicroStation window has an associated base priority. All dialog boxes are grouped into the same priority, and their base priority is higher than the base priority of graphic windows. The mdlWindow_float function returns to its base priority. The window is specified with windowP.

Parameters
[in]windowPwindow to sink
Returns
SUCCESS or ERROR if windowP is not a valid, sizable window.
See also
mdlWindow_toFront mdlWindow_toBack
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_titleCopy ( WCharP  titleP,
int  titleChars,
MSWindowP  windowP 
)

Retrieves the window's title specified by windowP into titleP as Unicode.

When retrieving the title, you must specify the number of characters in your string in titleChars.

Parameters
[out]titlePtitle of window
[in]titleCharssize of title output buffer, as number of characters
[in]windowPwindow to get title for
Returns
SUCCESS, or a nonzero value if there is an error.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_titleGet ( WStringR  title,
MSWindowP  windowP 
)

Retrieves the window's title specified by windowP into a WString object.

Parameters
[out]titletitle of window
[in]windowPwindow to get title for
Returns
SUCCESS, or a nonzero value if there is an error.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_titleSet ( MSWindowP  windowP,
WCharCP  title 
)

Sets the window's title specified by titleP.

Parameters
[in]windowPwindow to set title for
[in]titleUnicode title to set
Returns
SUCCESS, or a nonzero value if there is an error.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_toBack ( MSWindowP  windowP)

Moves the window to the back of its priority grouping.

Remarks
Each MicroStation window has an associated priority. All dialog boxes are grouped into the same priority, and their priority is higher than the priority of graphics windows. The mdlWindow_toFront function moves the window specified by windowP to the front of its priority grouping. To change a window's priority, use mdlWindow_sink and mdlWindow_float.
Parameters
[in]windowPwindow to move to back
Returns
SUCCESS, or a nonzero value if there is an error.
See also
mdlWindow_sink mdlWindow_float
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_toFront ( MSWindowP  windowP)

Moves the window to the front of its priority grouping.

Remarks
Each MicroStation window has an associated priority. All dialog boxes are grouped into the same priority, and their priority is higher than the priority of graphics windows. The mdlWindow_toBack function moves the window to the back of its priority grouping. To change a window's priority, use mdlWindow_sink and mdlWindow_float.
Parameters
[in]windowPwindow to move to front
Returns
SUCCESS, or a nonzero value if there is an error.
See also
mdlWindow_sink mdlWindow_float
Remarks
Required Library: mdlbltin.lib
void mdlWindow_updateAllWindows ( int  systemOnly)

Forces all open views and dialogs to be redrawn.

Parameters
[in]systemOnlyis intended for system use and should usually be set to 0.
See also
mdlView_updateSingle mdlView_updateMulti mdlView_updateMultiExtended
void mdlWindow_updateAllWindowsEx ( int  systemOnly,
bool  updateTitleAndIcon 
)

Forces all open views and dialogs to be redrawn.

Parameters
[in]systemOnlyis intended for system use and should usually be set to 0.
[in]updateTitleAndIconis intended for system use and should usually be set to 0.
See also
mdlView_updateSingle mdlView_updateMulti mdlView_updateMultiExtended
Remarks
Required Library: mdlbltin.lib
MSDialog* mdlWindow_viewWindowGet ( int  viewNum)

Retrieves a window pointer for one of MicroStation's views.

viewindex, of the value 0 to DgnPlatform::MAX_VIEWS - 1, inclusive, specifies the MicroStation view. If the specified view is out of range, the function returns NULL. Otherwise, it returns a pointer to the window structure (which may or may not be visible) for the view.

Parameters
[in]viewNumview to get window pointer for
Returns
A pointer to the window of the given view. It returns NULL if viewIndex is out of range.
Remarks
Required Library: mdlbltin.lib
void mdlWindow_windowEventsProcessAll ( )

Forces all outstanding window events to be processed.

Remarks
When windows are resized, moved, sunk, floated, pushed to the back, or pulled to the front, MicroStation queues refresh events to accomplish the necessary screen changes. These changes are generally not processed until MicroStation returns to its main input loop. If your program will do further processing and wants immediate action on the screen, it should call mdlWindow_windowEventsProcessAll.
Required Library: mdlbltin.lib

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