Functions
Dialog Box Drawing

Functions

void mdlDialog_diamondDraw (MSDialogP dbP, Point2dCP ptP, int size, bool raised, int colorIndex, bool fat)
 Draws a diamond in the specified Dialog Box. More...
 
void mdlDialog_diamondDrawCD (MSDialogP dbP, Point2dCP ptP, int size, bool raised, bool fat, BSIRectCP clipRectP, BSIColorDescrCP topShadowP, BSIColorDescrCP bottomShadowP, BSIColorDescrCP fillP, RawItemHdrP riP)
 Draws a diamond using specified colors in the specified Dialog Box. More...
 
void mdlDialog_ellipseDraw (MSDialogP dbP, DPoint2dCP originP, double primary, double secondary, double rotation, BSIRectCP clipRectP, int colorIndex)
 Draws an ellipse in the specified Dialog Box. More...
 
void mdlDialog_ellipseDrawCD (MSDialogP dbP, DPoint2dCP originP, double primary, double secondary, double rotation, BSIRectCP clipRectP, BSIColorDescrCP colorP, RawItemHdrP riP)
 Draws an ellipse using a specified color descriptor in the specified Dialog Box. More...
 
void mdlDialog_ellipseFill (MSDialogP dbP, DPoint2dCP originP, double primary, double secondary, double rotation, int colorIndex)
 Draws a filled ellipse of color colorIndex in the specified Dialog Box. More...
 
void mdlDialog_ellipseFillCD (MSDialogP dbP, DPoint2dCP originP, double primary, double secondary, double rotation, BSIRectCP clipRectP, BSIColorDescrCP colorP, RawItemHdrP riP)
 Draws a filled ellipse using the specified color descriptor in the specified Dialog Box. More...
 
void mdlDialog_lineStyleSet (MSDialogP dbP, int pattern, int colorIndex, int mode, int lweight)
 Sets the characteristics of the graphics that are subsequently drawn. More...
 
void mdlDialog_scrollArrowDraw (MSDialogP dbP, Point2dCP ptP, int size, bool raised, bool fillBlack, bool fat, int type)
 Draws a scroll-bar-item-like arrow in the specified Dialog Box. More...
 
void mdlDialog_scrollArrowDrawCD (MSDialogP dbP, Point2dCP ptP, int size, bool raised, bool fillBlack, bool fat, int type, BSIRectCP clipRectP, BSIColorDescrCP topShadowP, BSIColorDescrCP bottomShadowP, BSIColorDescrCP fillP, RawItemHdrP riP)
 An extension of mdlDialog_scrollArrowDraw with additional parameters and draws a scroll-bar-item-like arrow in the specified Dialog Box. More...
 
void mdlDialog_2DArrowDrawCD (MSDialogP dbP, Point2dCP ptP, int size, bool enabled, bool drawShaft, int type, BSIRectCP clipRectP, BSIColorDescrCP fillP, BSIColorDescrCP dimColorP, BSIColorDescrCP topShadowP, RawItemHdrP riP)
 Similar to mdlDialog_scrollArrowDrawCD function but only draws a Windows style 2D arrow. More...
 
void mdlDialog_textDraw (MSDialogP dbP, Point2dCP ptP, BSIRectCP clipRectP, WCharCP pwString, bool dimText)
 Draws the string into a Dialog Box. More...
 
void mdlDialog_textDrawN (MSDialogP dbP, Point2dCP ptP, BSIRectCP clipRectP, WCharCP pwString, bool dimText, size_t nChars)
 Draws text in a Dialog Box and may be truncated to a maximum length. More...
 
void mdlDialog_textDrawCD (MSDialogP dbP, Point2dCP ptP, BSIRectCP clipRectP, WCharCP pwString, bool dimText, BSIColorDescrCP foregroundP, BSIColorDescrCP backgroundP, BSIColorDescrCP dimColorP, RawItemHdrP riP)
 Draws text in a Dialog Box with specific foreground and background colors. More...
 
void mdlDialog_textDrawNCD (MSDialogP dbP, Point2dCP ptP, BSIRectCP clipRectP, WCharCP pwString, bool dimText, size_t nChars, BSIColorDescrCP foregroundP, BSIColorDescrCP backgroundP, BSIColorDescrCP dimColorP, RawItemHdrP riP)
 Draws text in a Dialog Box with specific foreground and background colors and possibly truncates the text to a maximum length. More...
 
int mdlDialog_toDCoord (MSDialogP dbP, int pixel)
 Converts a value that is in pixels to the corresponding dialog coordinate units value. More...
 
int mdlDialog_toPixels (MSDialogP dbP, int dialogCoord)
 Converts a value that is in dialog coordinate units to the corresponding pixel value. More...
 
void mdlDialog_underlineDraw (MSDialogP dbP, Point2dCP ptP, WCharCP pwString, int charIndex, int fontIndex, bool dimLine)
 Underlines text in a Dialog Box. More...
 
void mdlDialog_underlineDrawCD (MSDialogP dbP, Point2dCP ptP, WCharCP pwString, int charIndex, int fontIndex, bool dimLine, BSIRectCP clipRectP, BSIColorDescrCP foregroundP, BSIColorDescrCP dimColorP, RawItemHdrP riP)
 Underlines text in a Dialog Box with a particular color. More...
 
void mdlDialog_drawMoveHandles (MSDialogP dbP, DockPosition docked, BSIRectCP dialogRectP)
 Draws the handles the user grabs to move a docked dialog or toolbox. More...
 
void mdlDialog_linesDrawBeveled (MSDialogP dbP, BSIRectCP rP, bool raised, bool wide, bool vertical)
 Similar to the mdlDialog_rectDrawBeveled function but does not draw the lines at the specified ends of the rectangle. More...
 
void mdlDialog_linesDrawBeveledCD (MSDialogP dbP, BSIRectCP rP, bool raised, bool wide, bool vertical, BSIRectCP clipRectP, BSIColorDescrP topShadowP, BSIColorDescrP bottomShadowP, RawItemHdrP riP)
 Similar to mdlDialog_rectDrawBeveledCD function but does not draw the lines at the specified ends of the rectangle. More...
 
void mdlDialog_rectDrawInnerBorder (MSDialogP dbP, BSIRectCP rectP, bool raised, bool button)
 Draws a rectangle for the inner portion of a GUI item's Windows-style box. More...
 
void mdlDialog_rectDrawOuterBorder (MSDialog *dbP, BSIRectCP rectP, bool raised, bool button)
 Draws a rectangle for the outer portion of a GUI item's Windows-style box. More...
 
int mdlDialog_stringWidth (MSDialogP dbP, int fontIndex, WCharCP pwString)
 Returns the width in pixels of the specified string. More...
 
int mdlDialog_stringnWidth (MSDialogP dbP, int fontIndex, WCharCP pwString, size_t nChars)
 Returns the width in pixels of the first nChars characters of a string. More...
 
void mdlDialog_fileAbbreviateNameByPixels (WCharP fileName, int maxLength, MSDialogP dbP, int fontIndex)
 Abbreviates a file name to a shortened version based on file abbreviation rules. More...
 
bool mdlDialog_pathCompact (MSDialogP dbP, WCharP pwNewStr, WCharCP pwString, BSIRectCP clipRectP, int fontIndex)
 Abbreviates a Unicode string to a shortened version based on Microsoft's file abbreviation rules. More...
 
bool mdlDialog_isGradientAppropriate (MSDialogP dbP)
 Determines whether a gradient background is appropriate for this dialog. More...
 
bool mdlDialog_isMonoIconAlphaBlending (MSDialogP dbP)
 Determines whether a monochrome icon in this dialog should be drawn using alpha-blending. More...
 
void mdlDialog_setMonoIconAlphaBlending (MSDialogP dbP, bool bValue)
 Sets whether a monochrome icon in this dialog should be drawn using alpha-blending. More...
 
bool mdlVisualStyle_isThemeActive ()
 Determines whether a Windows visual theme is active. More...
 
StatusInt mdlVisualStyle_drawToolBarButton (MSDialogP dbP, RawItemHdrP riP, BSIRectCP pRect, bool bChecked, bool bHot, bool bPressed, BSIColorDescrP pBgColor)
 Draws a ToolBar Button using Visual Styles drawing. More...
 

Detailed Description

Function Documentation

void mdlDialog_2DArrowDrawCD ( MSDialogP  dbP,
Point2dCP  ptP,
int  size,
bool  enabled,
bool  drawShaft,
int  type,
BSIRectCP  clipRectP,
BSIColorDescrCP  fillP,
BSIColorDescrCP  dimColorP,
BSIColorDescrCP  topShadowP,
RawItemHdrP  riP 
)

Similar to mdlDialog_scrollArrowDrawCD function but only draws a Windows style 2D arrow.

Parameters
[in]dbPMSDialog to draw in
[in]ptPparameter specifies the location (in pixels) of the upper left corner of a square of size size which surrounds where the arrow will be drawn.
[in]sizesize of arrow base (must be odd)
[in]enabledparameter should be set to true to enable the item, or false
[in]drawShaftindicates whether to draw the shaft of the arrow
[in]typeparameter indicates the type of arrow to draw. Its value can be SCROLL_ARROW_UP, SCROLL_ARROW_DOWN, SCROLL_ARROW_LEFT or SCROLL_ARROW_RIGHT.
[in]clipRectPis a clipping rectangle (any drawing outside this rectangle is suppressed).
[in]fillPis a BSIColorDescr pointer, usually obtained from a DgnPlatform::BSIColorPalette.
[in]dimColorPspecifies the color to use for dim text. Only valid if dimText is true.
[in]topShadowPspecifies the Color Descriptor to use when drawing the top shadow
[in]riPis only used if fillP is NULL. In that case, it indicates a dialog item from which to get the value of fillP. The foreground color associated with the item is used.
See also
mdlDialog_scrollArrowDrawCD
Remarks
Required Library: mdlbltin.lib
void mdlDialog_diamondDraw ( MSDialogP  dbP,
Point2dCP  ptP,
int  size,
bool  raised,
int  colorIndex,
bool  fat 
)

Draws a diamond in the specified Dialog Box.

Parameters
[in]dbPMSDialog to draw diamond in
[in]ptPspecifies the location (in pixels) of the upper left corner of a square of size size which surrounds where the diamond will be drawn.
[in]sizeWARNG, must be odd
[in]raisedif the parameter is true, the diamond appears raised from the surface of the Dialog Box. Otherwise it appears recessed into the Dialog Box surface.
[in]colorIndexfixed color index to use for drawing
[in]fatthe diamond will be drawn with a two pixel edge instead of one pixel
See also
mdlDialog_diamondDrawCD
Remarks
Required Library: mdlbltin.lib
void mdlDialog_diamondDrawCD ( MSDialogP  dbP,
Point2dCP  ptP,
int  size,
bool  raised,
bool  fat,
BSIRectCP  clipRectP,
BSIColorDescrCP  topShadowP,
BSIColorDescrCP  bottomShadowP,
BSIColorDescrCP  fillP,
RawItemHdrP  riP 
)

Draws a diamond using specified colors in the specified Dialog Box.

Parameters
[in]dbPMSDialog to draw diamond in
[in]ptPspecifies the location (in pixels) of the upper left corner of a square of size size which surrounds where the diamond will be drawn.
[in]sizeWARNG, must be odd
[in]raisedif the parameter is true, the diamond appears raised from the surface of the Dialog Box. Otherwise it appears recessed into the Dialog Box surface.
[in]fatthe diamond will be drawn with a two pixel edge instead of one pixel
[in]clipRectPis a clipping rectangle (any drawing outside this rectangle is suppressed).
[in]topShadowPspecifies the Color Descriptor to use when drawing the top shadow
[in]bottomShadowPspecifies the Color Descriptor to use when drawing the bottom shadow
[in]fillPis a BSIColorDescr pointer, usually obtained from a DgnPlatform::BSIColorPalette.
[in]riPis only used if fillP is NULL. In that case, it indicates a dialog item from which to get the value of fillP. The foreground color associated with the item is used.
See also
mdlDialog_diamondDraw
Remarks
Required Library: mdlbltin.lib
void mdlDialog_drawMoveHandles ( MSDialogP  dbP,
DockPosition  docked,
BSIRectCP  dialogRectP 
)

Draws the handles the user grabs to move a docked dialog or toolbox.

Parameters
[in]dbPpoints to the dialog where the move handles will be drawn.
[in]dockedthe dock mode of the dialog: DOCK_TOP, BOTTOM, LEFT, RIGHT, NOTDOCKED
[in]dialogRectPthe rectangle of the Dialog Box
Remarks
Required Library: mdlbltin.lib
void mdlDialog_ellipseDraw ( MSDialogP  dbP,
DPoint2dCP  originP,
double  primary,
double  secondary,
double  rotation,
BSIRectCP  clipRectP,
int  colorIndex 
)

Draws an ellipse in the specified Dialog Box.

The origin of the ellipse is given in a double-precision 2D point, originP. The primary axis (the axis at zero degrees in the arc/ellipse coordinate system) is passed in primary, and the secondary axis (the axis at 90 degrees) is passed in secondary. You can produce a circle or circular arc by setting primary equal to secondary.

Parameters
[in]dbPMSDialog to draw ellipse in
[in]originPcenter point of ellipse
[in]primaryprimary axis
[in]secondarysecondary axis
[in]rotationrotation of entire ellipse
[in]clipRectPoverriding clip rectangle
[in]colorIndexfixed color index to use for drawing
Remarks
The entire ellipse can be rotated by rotation degrees and can optionally be clipped by clipRectP. If clipRectP is NULL, the arc is clipped to the window's content rectangle. The graphic attributes are determined by the most recent call to mdlWindow_lineStyleSet.
See also
mdlWindow_lineStyleSet mdlDialog_ellipseFill
Remarks
Required Library: mdlbltin.lib
void mdlDialog_ellipseDrawCD ( MSDialogP  dbP,
DPoint2dCP  originP,
double  primary,
double  secondary,
double  rotation,
BSIRectCP  clipRectP,
BSIColorDescrCP  colorP,
RawItemHdrP  riP 
)

Draws an ellipse using a specified color descriptor in the specified Dialog Box.

The origin of the ellipse is given in a double-precision 2D point, originP. The primary axis (the axis at zero degrees in the arc/ellipse coordinate system) is passed in primary, and the secondary axis (the axis at 90 degrees) is passed in secondary. You can produce a circle or circular arc by setting primary equal to secondary.

Parameters
[in]dbPMSDialog to draw ellipse in
[in]originPcenter point of ellipse
[in]primaryprimary axis
[in]secondarysecondary axis
[in]rotationrotation of entire ellipse
[in]clipRectPoverriding clip rectangle
[in]colorPis a BSIColorDescr pointer, usually obtained from a DgnPlatform::BSIColorPalette.
[in]riPis only used if colorP is NULL. In that case, it indicates a dialog item from which to get the value of colorP. The foreground color associated with the item is used.
Remarks
The entire ellipse can be rotated by rotation degrees and can optionally be clipped by clipRectP. If clipRectP is NULL, the arc is clipped to the window's content rectangle. The graphic attributes are determined by the most recent call to mdlWindow_lineStyleSet.
See also
mdlWindow_lineStyleSet mdlDialog_ellipseFill
Remarks
Required Library: mdlbltin.lib
void mdlDialog_ellipseFill ( MSDialogP  dbP,
DPoint2dCP  originP,
double  primary,
double  secondary,
double  rotation,
int  colorIndex 
)

Draws a filled ellipse of color colorIndex in the specified Dialog Box.

Parameters
[in]dbPdialog to draw in
[in]originPcenter pt of ellipse
[in]primarylength of primary axis
[in]secondarylength of secondary axis
[in]rotationrotation of entire ellipse
[in]colorIndexfixed color index fill color
Remarks
The origin of the ellipse is given in a double-precision 2D point, originP. The primary axis (the axis at 0° in the arc/ellipse coordinate system) is passed in primary, and the secondary axis (the axis at 90° ) is passed in secondary. You can produce a circle by setting primary equal to secondary. The entire ellipse can be rotated by rotation degrees.
See also
mdlWindow_ellipseFill
Remarks
Required Library: mdlbltin.lib
void mdlDialog_ellipseFillCD ( MSDialogP  dbP,
DPoint2dCP  originP,
double  primary,
double  secondary,
double  rotation,
BSIRectCP  clipRectP,
BSIColorDescrCP  colorP,
RawItemHdrP  riP 
)

Draws a filled ellipse using the specified color descriptor in the specified Dialog Box.

Parameters
[in]dbPdialog to draw in
[in]originPcenter pt of ellipse
[in]primarylength of primary axis
[in]secondarylength of secondary axis
[in]rotationrotation of entire ellipse
[in]clipRectPoverriding clip rectangle
[in]colorPis a BSIColorDescr pointer, usually obtained from a DgnPlatform::BSIColorPalette.
[in]riPis only used if colorP is NULL. In that case, it indicates a dialog item from which to get the value of colorP. The foreground color associated with the item is used.
Remarks
The origin of the ellipse is given in a double-precision 2D point, originP. The primary axis (the axis at 0° in the arc/ellipse coordinate system) is passed in primary, and the secondary axis (the axis at 90° ) is passed in secondary. You can produce a circle by setting primary equal to secondary. The entire ellipse can be rotated by rotation degrees.
See also
mdlWindow_ellipseFill
Remarks
Required Library: mdlbltin.lib
void mdlDialog_fileAbbreviateNameByPixels ( WCharP  fileName,
int  maxLength,
MSDialogP  dbP,
int  fontIndex 
)

Abbreviates a file name to a shortened version based on file abbreviation rules.

Parameters
[in,out]fileNamebuffer containing the Unicode file name, which is modified in place
[in]maxLengthmaximum length in pixels of the file name
[in]dbPspecifies which Dialog Box the file name is drawn in.
[in]fontIndexspecifies which font is used when drawing the file name.
See also
mdlDialog_fileAbbreviateNameByPixelsA
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_isGradientAppropriate ( MSDialogP  dbP)

Determines whether a gradient background is appropriate for this dialog.

Parameters
[in]dbPa pointer to the MSDialog to query.
Returns
true if a gradient background is appropriate for this dialog, false if it is not.
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_isMonoIconAlphaBlending ( MSDialogP  dbP)

Determines whether a monochrome icon in this dialog should be drawn using alpha-blending.

Parameters
[in]dbPa pointer to the MSDialog
Returns
true is alpha-blending should be used when drawing a monochrome icon.
Remarks
Required Library: mdlbltin.lib
void mdlDialog_linesDrawBeveled ( MSDialogP  dbP,
BSIRectCP  rP,
bool  raised,
bool  wide,
bool  vertical 
)

Similar to the mdlDialog_rectDrawBeveled function but does not draw the lines at the specified ends of the rectangle.

Parameters
[in]dbPMSDialog to draw beveled lines in
[in]rPpoints to the rectangle outling the lines to draw
[in]raisedtrue indicates raised look; false indicates recessed look
[in]widetrue indicates bevel is two pixels wide; false indicates bevel is one pixel wide
[in]verticalindicates whether the rectangle represented by rP is vertical (true) or horizontal (false)
Remarks
Required Library: mdlbltin.lib
See also
mdlDialog_rectDrawBeveled mdlDialog_linesDrawBeveledCD
void mdlDialog_linesDrawBeveledCD ( MSDialogP  dbP,
BSIRectCP  rP,
bool  raised,
bool  wide,
bool  vertical,
BSIRectCP  clipRectP,
BSIColorDescrP  topShadowP,
BSIColorDescrP  bottomShadowP,
RawItemHdrP  riP 
)

Similar to mdlDialog_rectDrawBeveledCD function but does not draw the lines at the specified ends of the rectangle.

Parameters
[in]dbPMsDialog to draw beveled lines in
[in]rPbeveled rectangle
[in]raisedtrue indicates raised look; false indicates recessed look
[in]widetrue indicates bevel is two pixels wide; false indicates bevel is one pixel wide
[in]verticalindicates whether the rectangle represented by rP is vertical (true) or horizontal (false)
[in]clipRectPis a clipping rectangle (any drawing outside this rectangle is suppressed).
[in]topShadowPspecifies the Color Descriptor to use when drawing the top shadow
[in]bottomShadowPspecifies the Color Descriptor to use when drawing the bottom shadow
[in]riPspecifies the RawItemHdr of the item to get colors from
Remarks
Required Library: mdlbltin.lib
See also
mdlDialog_rectDrawBeveledCD mdlDialog_linesDrawBeveled
void mdlDialog_lineStyleSet ( MSDialogP  dbP,
int  pattern,
int  colorIndex,
int  mode,
int  lweight 
)

Sets the characteristics of the graphics that are subsequently drawn.

The db argument designates the Dialog Box that you intend to draw to. On some platforms (such as the PC), the graphic attributes are shared for all windows on a given screen and are not maintained for each window individually. Therefore, as a general rule, set the graphic attributes when you draw on the screen.

Parameters
[in]dbPMSDialog to set lineStyle in
[in]patternspecifies an on/off pattern for the line to be drawn. Possible values are 0 through 7, resulting in solid, dotted, medium-dashed, long-dashed, dot-dashed short-dashed, dash double-dot and long dash-short dashlines, respectively.
[in]colorIndexspecifies a color index for the graphics. Its usual value is WHITE_INDEX, BLACK_INDEX, LGREY_INDEX or DGREY_INDEX. See msdefs.h for the complete list of possible color indexes.
[in]modedetermines whether the lines will be drawn on the screen (mode 0), or combined with the current screen contents using the XOR (exclusive OR) operation (mode 1).
[in]lweightspecifies the line thickness. Possible values are 0 to 31. Sometimes two adjacent line thicknesses will display the same on the screen because of the limited resolution available on some displays. (For example 0 and 1 may set only one pixel).
See also
mdlDialog_textDraw
Remarks
Required Library: mdlbltin.lib
bool mdlDialog_pathCompact ( MSDialogP  dbP,
WCharP  pwNewStr,
WCharCP  pwString,
BSIRectCP  clipRectP,
int  fontIndex 
)

Abbreviates a Unicode string to a shortened version based on Microsoft's file abbreviation rules.

Parameters
[in]dbPspecifies which Dialog Box the file name is drawn in.
[out]pwNewStrbuffer filled with the compacted Unicode string
[in]pwStringbuffer containing the Unicode string to compact
[in]clipRectPis a clipping rectangle (any drawing outside this rectangle is suppressed).
[in]fontIndexspecifies which font is used when drawing the file name.
Returns
true if successful, or false otherwise.
Remarks
Required Library: mdlbltin.lib
void mdlDialog_rectDrawInnerBorder ( MSDialogP  dbP,
BSIRectCP  rectP,
bool  raised,
bool  button 
)

Draws a rectangle for the inner portion of a GUI item's Windows-style box.

Parameters
[in]dbPMSDialog to draw rectangle in
[in]rectPOuter coordinates of rectangle to draw
[in]raisedindicates whether box is raised (true) on sunken (false)
[in]buttonindicates whether this is a button item
Remarks
Required Library: mdlbltin.lib
See also
mdlDialog_rectDrawOuterBorder
void mdlDialog_rectDrawOuterBorder ( MSDialog dbP,
BSIRectCP  rectP,
bool  raised,
bool  button 
)

Draws a rectangle for the outer portion of a GUI item's Windows-style box.

Parameters
[in]dbPMSDialog to draw rectangle in
[in]rectPOuter coordinates of rectangle to draw
[in]raisedindicates whether box is raised (true) on sunken (false)
[in]buttonindicates whether this is a button item
Remarks
Required Library: mdlbltin.lib
See also
mdlDialog_rectDrawInnerBorder
void mdlDialog_scrollArrowDraw ( MSDialogP  dbP,
Point2dCP  ptP,
int  size,
bool  raised,
bool  fillBlack,
bool  fat,
int  type 
)

Draws a scroll-bar-item-like arrow in the specified Dialog Box.

Parameters
[in]dbPMSDialog to draw in
[in]ptPparameter specifies the location (in pixels) of the upper left corner of a square of size size which surrounds where the arrow will be drawn.
[in]sizesize of arrow base (must be odd)
[in]raisedif the parameter is true, the arrow appears raised from the surface of the Dialog Box. Otherwise it appears recessed into the Dialog Box surface.
[in]fillBlackif the parameter is true, the inside of the arrow is drawn in black instead of light gray. fillBlack is usually false.
[in]fatif the parameter is true, the arrow will have two pixel wide edges. Otherwise, the edges will only be one pixel wide.
[in]typeparameter indicates the type of arrow to draw. Its value can be SCROLL_ARROW_UP, SCROLL_ARROW_DOWN, SCROLL_ARROW_LEFT or SCROLL_ARROW_RIGHT.
See also
mdlDialog_scrollBarSetRange
Remarks
Required Library: mdlbltin.lib
void mdlDialog_scrollArrowDrawCD ( MSDialogP  dbP,
Point2dCP  ptP,
int  size,
bool  raised,
bool  fillBlack,
bool  fat,
int  type,
BSIRectCP  clipRectP,
BSIColorDescrCP  topShadowP,
BSIColorDescrCP  bottomShadowP,
BSIColorDescrCP  fillP,
RawItemHdrP  riP 
)

An extension of mdlDialog_scrollArrowDraw with additional parameters and draws a scroll-bar-item-like arrow in the specified Dialog Box.

Parameters
[in]dbPMSDialog to draw in
[in]ptPparameter specifies the location (in pixels) of the upper left corner of a square of size size which surrounds where the arrow will be drawn.
[in]sizesize of arrow base (must be odd)
[in]raisedif the parameter is true, the arrow appears raised from the surface of the Dialog Box. Otherwise it appears recessed into the Dialog Box surface.
[in]fillBlackif the parameter is true, the inside of the arrow is drawn in black instead of light gray. fillBlack is usually false.
[in]fatif the parameter is true, the arrow will have two pixel wide edges. Otherwise, the edges will only be one pixel wide.
[in]typeparameter indicates the type of arrow to draw. Its value can be SCROLL_ARROW_UP, SCROLL_ARROW_DOWN, SCROLL_ARROW_LEFT or SCROLL_ARROW_RIGHT.
[in]clipRectPis a clipping rectangle (any drawing outside this rectangle is suppressed).
[in]topShadowPspecifies the Color Descriptor to use when drawing the top shadow
[in]bottomShadowPspecifies the Color Descriptor to use when drawing the bottom shadow
[in]fillPis a BSIColorDescr pointer, usually obtained from a DgnPlatform::BSIColorPalette.
[in]riPis only used if fillP is NULL. In that case, it indicates a dialog item from which to get the value of fillP. The foreground color associated with the item is used.
See also
mdlDialog_scrollArrowDraw
Remarks
Required Library: mdlbltin.lib
void mdlDialog_setMonoIconAlphaBlending ( MSDialogP  dbP,
bool  bValue 
)

Sets whether a monochrome icon in this dialog should be drawn using alpha-blending.

Parameters
[in]dbPa pointer to the MSDialog
[in]bValuetrue if a pointer to the MSDialog
Returns
true alpha-blending should be used when drawing a monochrome icon; false otherwise.
Remarks
Required Library: mdlbltin.lib
int mdlDialog_stringnWidth ( MSDialogP  dbP,
int  fontIndex,
WCharCP  pwString,
size_t  nChars 
)

Returns the width in pixels of the first nChars characters of a string.

Parameters
[in]dbPspecifies which Dialog Box the string would be drawn in.
[in]fontIndexparameter specifies the font the string would be
drawn in. -1 indicates the font currently associated with the Dialog Box should be used.
[in]pwStringUnicode string to measure
[in]nCharsnumber of characters to measure
Returns
The width in pixels of the first nChars characters of the string pointed at by pwString.
Remarks
Required Library: mdlbltin.lib
See also
mdlDialog_stringnWidthA
int mdlDialog_stringWidth ( MSDialogP  dbP,
int  fontIndex,
WCharCP  pwString 
)

Returns the width in pixels of the specified string.

Parameters
[in]dbPspecifies which Dialog Box the string would be drawn in.
[in]fontIndexparameter specifies the font the string would be
drawn in. -1 indicates the font currently associated with the Dialog Box should be used.
[in]pwStringUnicode string to measure
Returns
The width in pixels of the string pointed at by pwString.
Remarks
Required Library: mdlbltin.lib
See also
mdlDialog_stringWidth
void mdlDialog_textDraw ( MSDialogP  dbP,
Point2dCP  ptP,
BSIRectCP  clipRectP,
WCharCP  pwString,
bool  dimText 
)

Draws the string into a Dialog Box.

Parameters
[in]dbPMSDialog to draw in
[in]ptPparameter specifies the upper left corner of where the text will be drawn.
[in]clipRectPclipping rectangle can be specified with clipRectP, or the value NULL causes the routine to use the Dialog Box's content rectangle.
[in]pwStringUnicode string to draw
[in]dimTextif it is true, the text is drawn with a "dimmed" appearance. On color screens this is a medium gray color, on monochrome screens the text looks half-toned. If dimText is false, the text is drawn in black.
Remarks
The text is always drawn using the font currently associated with the Dialog Box.
See also
mdlDialog_textDrawN
Remarks
Required Library: mdlbltin.lib
void mdlDialog_textDrawCD ( MSDialogP  dbP,
Point2dCP  ptP,
BSIRectCP  clipRectP,
WCharCP  pwString,
bool  dimText,
BSIColorDescrCP  foregroundP,
BSIColorDescrCP  backgroundP,
BSIColorDescrCP  dimColorP,
RawItemHdrP  riP 
)

Draws text in a Dialog Box with specific foreground and background colors.

Parameters
[in]dbPis the dialog to draw in.
[in]ptPindicates the position for the text.
[in]clipRectPis a clipping rectangle (any drawing outside this rectangle is suppressed).
[in]pwStringUnicode string to draw
[in]dimTextindicates that the text should be dimmed.
[in]foregroundPspecifies the foreground color for the text.
[in]backgroundPspecifies the background color for the text.
[in]dimColorPspecifies the color to use for dim text. Only valid if dimText is true.
[in]riPis only used if foregroundP or backgroundP is NULL. In that case, it indicates a dialog item from which to get the default foreground or background color.
See also
mdlDialog_textDraw
Remarks
Required Library: mdlbltin.lib
void mdlDialog_textDrawN ( MSDialogP  dbP,
Point2dCP  ptP,
BSIRectCP  clipRectP,
WCharCP  pwString,
bool  dimText,
size_t  nChars 
)

Draws text in a Dialog Box and may be truncated to a maximum length.

Parameters
[in]dbPis the dialog to draw in.
[in]ptPindicates the position for the text.
[in]clipRectPis a clipping rectangle (any drawing outside this rectangle is suppressed).
[in]pwStringUnicode text to be drawn.
[in]dimTextindicates that the text should be dimmed.
[in]nCharsnumber of chars to draw
See also
mdlDialog_textDraw
Remarks
Required Library: mdlbltin.lib
void mdlDialog_textDrawNCD ( MSDialogP  dbP,
Point2dCP  ptP,
BSIRectCP  clipRectP,
WCharCP  pwString,
bool  dimText,
size_t  nChars,
BSIColorDescrCP  foregroundP,
BSIColorDescrCP  backgroundP,
BSIColorDescrCP  dimColorP,
RawItemHdrP  riP 
)

Draws text in a Dialog Box with specific foreground and background colors and possibly truncates the text to a maximum length.

Parameters
[in]dbPis the dialog to draw in.
[in]ptPindicates the position for the text.
[in]clipRectPis a clipping rectangle (any drawing outside this rectangle is suppressed).
[in]pwStringUnicode string to draw
[in]dimTextindicates that the text should be dimmed.
[in]nCharsindicates the maximum number of characters in stringP to draw.
[in]foregroundPspecifies the foreground color for the text.
[in]backgroundPspecifies the background color for the text.
[in]dimColorPspecifies the color to use for dim text. Only valid if dimText is true.
[in]riPis only used if foregroundP or backgroundP is NULL. In that case, it indicates a dialog item from which to get the default foreground or background color.
See also
mdlDialog_textDrawN
Remarks
Required Library: mdlbltin.lib
int mdlDialog_toDCoord ( MSDialogP  dbP,
int  pixel 
)

Converts a value that is in pixels to the corresponding dialog coordinate units value.

The font currently associated with the Dialog Box is used in the calculation.

Parameters
[in]dbPMSDialog in which conversion takes place
[in]pixelpixel coordinate to convert
Returns
A value in dialog coordinate units that was originally in pixels.
See also
mdlDialog_toPixels
Remarks
Required Library: mdlbltin.lib
int mdlDialog_toPixels ( MSDialogP  dbP,
int  dialogCoord 
)

Converts a value that is in dialog coordinate units to the corresponding pixel value.

The font currently associated with the Dialog Box is used in the calculation.

Parameters
[in]dbPMSDialog in which conversion takes place
[in]dialogCoorddialog coordianates to convert
Returns
A value in pixels that was originally in dialog coordinate units.
See also
mdlDialog_toDCoord
Remarks
Required Library: mdlbltin.lib
void mdlDialog_underlineDraw ( MSDialogP  dbP,
Point2dCP  ptP,
WCharCP  pwString,
int  charIndex,
int  fontIndex,
bool  dimLine 
)

Underlines text in a Dialog Box.

Parameters
[in]dbPpoints to the dialog where the text is to be underlined.
[in]ptPis the position of the text, stringP (not necessarily the underlining).
[in]pwStringis the Unicode string of which all or part is to be underlined.
[in]charIndexis the index of the first character in stringP to be underlined.
[in]fontIndexspecifies the font being used for the string. Usually this will be FONT_INDEX_DIALOG.
[in]dimLineindicates the type of color to be used for drawing the underline. If true, the default dim color is used, otherwise the default foreground color is used.
See also
mdlDialog_underlineDrawCD
Remarks
Required Library: mdlbltin.lib
void mdlDialog_underlineDrawCD ( MSDialogP  dbP,
Point2dCP  ptP,
WCharCP  pwString,
int  charIndex,
int  fontIndex,
bool  dimLine,
BSIRectCP  clipRectP,
BSIColorDescrCP  foregroundP,
BSIColorDescrCP  dimColorP,
RawItemHdrP  riP 
)

Underlines text in a Dialog Box with a particular color.

Parameters
[in]dbPpoints to the dialog where the text is to be underlined.
[in]ptPis the position of the text, stringP (not necessarily the underlining).
[in]pwStringis the Unicode string of which all or part is to be underlined.
[in]charIndexis the index of the first character in stringP to be underlined.
[in]fontIndexspecifies the font being used for the string. Usually this will be FONT_INDEX_DIALOG.
[in]dimLineindicates the type of color to be used for drawing the underline. If true, the dimColorP color descriptor is used, otherwise the foregroundP color descriptor is used.
[in]clipRectPis a clipping rectangle (any drawing outside this rectangle is suppressed).
[in]foregroundPspecifies the foreground color for the underlining if the underline is not dim.
[in]dimColorPspecifies the color to use for dim underlining.
[in]riPis only used if foregroundP or dimColorP is NULL. In that case, it indicates a dialog item from which to get the default foreground or dimmed color.
See also
mdlDialog_underlineDrawCD
Remarks
Required Library: mdlbltin.lib
StatusInt mdlVisualStyle_drawToolBarButton ( MSDialogP  dbP,
RawItemHdrP  riP,
BSIRectCP  pRect,
bool  bChecked,
bool  bHot,
bool  bPressed,
BSIColorDescrP  pBgColor 
)

Draws a ToolBar Button using Visual Styles drawing.

Parameters
[in]dbPThe MSDialog to draw to
[in]riPThe Dialog button item
[in]pRectThe bounding rectangle of the button
[in]bCheckedIndicates whether the button is checked/selected
[in]bHotIndicates whether the mouse is over the button
[in]bPressedIndicates whether the button is pressed with the mouse
[in,out]pBgColorA pointer to a BSIColorDescr that is filled with information about the background color used when drawing
Remarks
Required Library: mdlbltin.lib
Returns
SUCCESS if the button was drawn, otherwise it returns ERROR.
bool mdlVisualStyle_isThemeActive ( )

Determines whether a Windows visual theme is active.

Remarks
Required Library: mdlbltin.lib
Returns
true if a Windows visual theme is active

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