Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Toolkit User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

15.2 Bitmapped Dialog

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.

Figure 114: Objective Toolkit BmpDialog32 Sample Dialog

SECBitmapDialog is a direct enhancement of CDialog.

Figure 115: Objective Toolkit SECBitmapDialog Class Hierarchy

15.2.1 Using SECBitmapDialog

The following sections describe how you can implement Objective Toolkit's User Interface Extensions.

15.2.1.1 To incorporate the SECBitmapDialog class into your code

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.

15.2.1.2 To set the image used by the SECBitmapDialog class

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.

15.2.2 Customizing SECBitmapDialog

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.



Previous fileTop of DocumentContentsNo linkNext file

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.