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

15.5 Splash Window

A splash window is a transient window that appears temporarily when the user starts the application. Generally, the pop-up window displays a copyright notice while the application is initialized.

15.5.1 The SECSplashWnd Class

The SECSplashWnd class provides you with a ready-to-use splash window for your applications. All you need to do is insert a splash bitmap and text. The splash window deletes itself after a specified time or when the user clicks it, so you do not have to keep track of the splash window in your application.

Figure 119: Objective Toolkit's Splash Window Class Hierarchy

Table 39 lists and describes the SECSplashWnd methods.

Table 39: SECSplashWnd Methods

Method Description
AllowUserDismiss() Sets whether the user can dismiss the Splash Screen by clicking the mouse or pressing a key. Default: True.
EnableTimer() You can create the Splash Screen without enabling the timer. Call this function to start the countdown.
SetTaskbarTitle() The Splash Screen can include a taskbar entry. Use this function to set the Taskbar Caption. Default: No taskbar entry.
SetAlwaysOnTop() You can set the Splash Screen to WS_EX_TOPMOST. Default: Not set to WS_EX_TOPMOST, unless it is created before the application's main window.
PostSplashDraw() This is an overridable method that lets you paint on top of the Splash Screen after it is rendered to the screen.
Dismiss() This function dismisses the Splash Screen.
DisableParent() You can disable or enable the parent of the Splash Screen when the Splash Screen is displayed. Default: Parent enabled.

The SECSplashWnd constructor has an alternate constructor that takes two additional parameters— bWaitForTimer and bAlwaysOnTop.

If you want to display a login or password dialog with SECSplashWnd as the parent, set the third parameter to TRUE and then call EnableTimer() when you dismiss the dialog.

15.5.2 Using SECSplashWnd

To add SECSplashWnd to your application:

  1. In the Visual Studio resource editor, add a splash screen bitmap resource.

  2. Create an instance of SECSplashWnd on the heap. In the constructor, specify the bitmap ID and the duration for the splash window. For example:

      m_pSplashWnd = new SECSplashWnd(IDB_SPLASHWND,3500);
      
  3. Call the Create() method to create the splash window.

      m_pSplashWnd->Create();
      

15.5.3 SECSplashWnd Samples

The sample Splash51 demonstrates the 32-bit implementation of SECSplashWnd. This sample also uses the SECRegistry classes to read the user's name from the registry and display it on the splash screen during application startup. When you open the project in Visual Studio, the bitmap used by SECSplashWnd appears in the list of application resources.

This sample does not ship with the product. For information on how to obtain this sample, 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.