BCGSuite for MFC
CBCGPMessageBox

Detailed Description

The CBCGPMessageBox class implements a message box that is displayed using current visual theme.

In addition it can be configured to display a check box, user-defined buttons, a separator between "message" and "buttons" area, a banner in the "buttons" area.

All these options can be specified and passed in using BCGP_MSGBOXPARAMS structure.

For more information see MessageBoxDemo sample.

+ Inheritance diagram for CBCGPMessageBox:

Public Member Functions

 CBCGPMessageBoxThe constructor.
 
 CBCGPMessageBoxThe constructor.
 
- Public Member Functions inherited from CBCGPDialog
 CBCGPDialogConstructs a CBCGPDialog object
 
 CBCGPDialogConstructs a CBCGPDialog object
 
 AutoResizeControlsEnable auto-resizing check boxes, radio buttons and static labels.
 
 ClosePopupDlgCloses the popup dialog.
 
 DoDrawSpecialAreaOnNCInitiates drawing of specific area on the dialog box edges (non-client area). If you're calling this method, you should handle BCGM_ONDRAWNCSPECIALAREA registered message in your dialog class.
 
 EnableAeroAdds DWM ("Glass") support either to whole dialog, or to some of its margins.
 
 EnableDragClientAreaAllows to drag the dialog box by clicking inside the client area.
 
 EnableExpandEnables expanding and collapsing of the dialog's part.
 
 EnableExpandEnables expanding and collapsing of the dialog's part.
 
 EnableLayoutEnables or disables layout manager for a dialog box
 
 EnableLoadWindowPlacementEnables loading/saving window placement from/to the registry.
 
 EnableVisualManagerStyleAdds visual theme support to the dialog
 
 ExpandExpands or collapses the dialog box.
 
 GetAeroMarginsRetrieves the dialog DWM (glass) margins.
 
 GetInfoTipControlGets a dialog control with currently active info tip.
 
 GetLayoutReturns a pointer to layout manager.
 
 HasAeroMarginsTells whether a window has "DWM (glass) margins.
 
 HasBackgroundImageTells whether the dialog has background image.
 
 IsAutoPrepareComboListStylesTells whether all child list box and combo boxes should be recreated by adding "owner-draw fixed" and "has strings" Windows styles.
 
 IsControlsDefaultDlgBackgroundTells whether controls background redrawing is optimized.
 
 IsDragClientAreaEnabledTells whether a drag client area is enabled.
 
 IsExpandAreaSpecialBackgroundTells whether a dialog expanded area has a special background.
 
 IsExpandedTells whether the dialog box is expanded.
 
 IsGroupBoxesDrawByParentTells whether group box control is rendered by parent window.
 
 IsLayoutEnabledTells whether layout management is enabled for a dialog box.
 
 IsMFCResourceLayoutTells whether the dialog uses MFC resource (loaded from the dialog resource) layout.
 
 IsOwnerDrawCaptionTells whether a dialog has an owner-draw caption.
 
 IsVisualManagerNCAreaTells whether a non-client area of the window uses visual manager style.
 
 IsVisualManagerStyleTells whether a window uses visual manager style.
 
 IsWindowPlacementEnabledTells whether loading/saving window placement from/to the registry is enabled.
 
 IsWsCaptionStyleTells whether a window with themed non-client area is created with WS_CAPTION style.
 
 OnAfterExpandCalled by the framework after the dialog was expanded.
 
 OnBeforeExpandCalled by the framework before the dialog is expanded.
 
 RemoveInfoTipsRemoves all previously added information tips.
 
 SetBackgroundColorSets a new background color
 
 SetBackgroundImageSets the dialog box's background image
 
 SetBackgroundImageSets the dialog box's background image
 
 SetControlInfoTipAdds an information tip to the dialog child control specified by control ID.
 
 SetControlInfoTipAdds an information tip to the dialog child control specified by window.
 
 SetControlsDefaultDlgBackgroundEnables/disables child controls background optimized redrawing.
 
 SetEditBoxesVerticalAlignmentSpecifies vertical alignment for all edit boxes located on the window (single-line only).
 
 SetExpandAreaSpecialBackgroundSpecifies whether a dialog expanded area has a special (usually darker) background.
 
 SetGroupBoxesDrawByParentEnables drawing group box controls by the parent window.
 

Static Public Attributes

 m_bDontUseDefaultIconThis global flag specifies whether a default icon will be displayed on the message box. By default, this flag is TRUE.
 
 m_bDrawSpecialAreaOnNCThis global flag specifies whether the button (bottom) area will be filled with an alternate color. By default, this flag is TRUE. Set this flag to FALSE if you don't wish to fill the message box button area with an alternate background color.
 
 m_bUseNativeCaptionThis global flag specifies whether the Windows native caption and border will be used in the message boxes.
 
 m_bUseNativeControlsThis global flag specifies whether the Windows native controls will be used in the message boxes.
 
 m_bUseNativeIconsThis global flag specifies whether the Windows native icons will be used in the message boxes. By default, the message box displays an MS Office-style icon.
 
 m_nLimitCaptionWidthThis global flag allows you to limit the dialog width in the case of very long caption text. E.g., if you set this variable to 70, the caption width will be limited by 70 percent of the screen width. If this flag is 0 (the default value), the whole caption text is displayed.
 
 m_nTextCalculationStepThis global flag specifies the text layout calculation tolerance (in pixels, 10 by default; the allowed range is 5-200). Specify a larger value if you have message boxes with long texts to optimize the dialog initialization time.
 

Additional Inherited Members

- Public Types inherited from CBCGPDialog
enum  BackgroundLocation
 
- Protected Member Functions inherited from CBCGPMessageBoxImpl
 IsDrawButtonsBannerTells whether the bottom area around the message box buttons is drawn with a special background.
 
- Protected Attributes inherited from CBCGPDialog
 m_bDisableShadowsSpecifies whether the dialog custom shadows should be disabled.