SECBitmapDialog lets you create dialogs with tiled or centered bitmaps in the background. Use SECBitmapDialog to decorate your application dialogs with 16 or 256 color bitmaps.
The following figure demonstrates how you can use bitmaps in your dialogs.
SECBitmapDialog is a direct enhancement of CDialog.
The following sections describe how you can implement Objective Toolkit's User Interface Extensions.
Use the SECBitmapDialog as you would use CDialog. SECBitmapDialog adds a SetBitmap() member function. Use SetBitmap() to specify the bitmap and a display mode. The following display modes are available.
Display mode flag | Description |
SEC_BITMAP_TILE | Tiles the bitmap in the dialog's background. |
SEC_BITMAP_CENTER | Centers the bitmap in the dialog's background. |
SEC_BITMAP_FILL | Fills the dialog with the specified bitmap. |
The following code creates a dialog with a tiled bitmap in the background.
SECBitmapDialog bmpDlg(IDD_MODAL_BMPDLG); bmpDlg.SetBitmap(IDB_BRICKWALL, SEC_BITMAP_TILE); bmpDlg.DoModal(); |
You can set the bitmap used in an SECBitmapDialog by calling the SetBitmap() method, which has three overloads. The first overload accepts a resource ID of a bitmap resource. The second overload accepts the filename of a bitmap file. The third overload takes a pointer to an SECImage-derived object. Objective Toolkit can use any of the overloads for 256-color support.
To change the bitmap at run time, the application can call SetBitmap() multiple times. Use SetNullBitmap() to remove the bitmap from the dialog.
There is one overridable method in the SECBitmapDialog class: OnStaticCtlColor(). You can override this function to set the text color for Static controls.
SECBitmapDialog features are demonstrated in the sample DmpDialog32. SECBitmapDialog modes are demonstrated in the sample TodTest. These samples do not ship with the product. For information on how to obtain these samples, see Section 3.6.1, "Location of Sample Code," in the Stingray Studio Getting Started Guide.
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.