Click here to Skip to main content
11,578,739 members (64,053 online)
Click here to Skip to main content

Splasher v1.32 - A Splash Screen Implementation

, 3 Mar 2000 157.2K 3.9K 79
Rate this:
Please Sign up or sign in to vote.
An improved splash screen component for MFC.
  • Download source files - 62 Kb
  • Introduction

    Welcome to Splasher, A freeware MFC class to implement a splash screen.


    Features
    Usage
    History
    Contacting the Author


    Features

    This class provides a number of advantages over and above the standard splash screen component that is included with VC++.

    • The code can optionally use an external DIB file instead of a bitmap resource. This allows your splash screen to be easily customized at run time without the need to change a bitmap resource inside your exe. For example you could ship two versions of bitmap files, one for 16 color screens and a 256 color bitmap for higher screen depths. You could also allow your end user to change the splash screen.

    • The palette from the DIB is read from file and is used to provide support for more colors than the standard 16 which are available with bitmap resources.

    • The splash screen component is multi-threaded, meaning that it remains responsive and redraws itself correctly while you can be loading up your application in the normal InitInstance() override.

    • The splash screen is coded so that it will only be brought down when you want it to, not when the user clicks on it or a timer expires. This allows you to close it down exactly when your application is ready for input and no longer needs to display the splash screen.


    Usage

    • To use the class in your code simply include splasher.cpp in your project and #include splasher.h in your applications' CWinApp derived module.
    • A sample SDI appwizard generated application is included which demonstrates it use. To incorporate the splash screen component you will just need to add approximately 10 lines of code to your applications InitInstance() function. To see the classes in action, have a look at the code in InitInstance() in the module spltest.cpp.
    • Your code will need to include MFC either statically or dynamically.


    History

    V1.0 (15th November 1996)
    • Initial public release.

    V1.1 (11th December 1997)

    • Incorporation of new DIB code provided by the authors own CDibImage class. A static library version is used by splasher here. If you want to use CDIbImage for anything other than CSplashThread, then you need to download CDibImage on its own.
    • Can now load from resource or bitmap.
    • General tidy up of the code.

    V1.2 (22nd March 1998)

    • Palette is now correctly initialized on startup.
    • Code now protects itself if m_SplashScreen cannot be created.

    V1.3 (22th December 1998)

    • Now provided VC 5 workspace files as standard.
    • Removed the dependence of splasher on CDibImage (another shareware product of the author).
    • Provision of HTML help file (this file) describing the class.
    • The code is now UNICODE enabled and UNICODE build configurations are provided in the sample app.
    • General tidy up of the code.
    • Fixed a potential race condition in CSplashThread::HideSplash().
    • Reduced the size of the zip file by only including the demo bitmap once.

    V1.31 (21st June 1999)

    • Fixed a bug which was causing an assert when loading up a bitmap which does not have an associated palette.

    V1.32 (1st March 2000)

    • Fixed a problem with bitmaps which do not have a palette (Again <g>)
    • Fixed a problem in Win 98 and Win2000 when the splash screen is closed but the main window of your app fails to activate. The code now uses AttachThreadInput to synchronise the UI activities of the main GUI thread and the splash screen thread.


    Contacting the Author

    PJ Naughter
    Email: pjn@indigo.ie
    Web: http://www.naughter.com
    1 March 2000


    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here

    Share

    About the Author

    PJ Naughter
    United States United States
    No Biography provided

    You may also be interested in...

    Comments and Discussions

     
    QuestionHow to use this to make a splash screen for an .NET application? Pin
    khoirom2-Jun-13 23:52
    memberkhoirom2-Jun-13 23:52 
    SuggestionAllowing main app window to call SetForegroundWindow() Pin
    TheWizardOfOz1-Nov-11 8:33
    memberTheWizardOfOz1-Nov-11 8:33 
    GeneralMemory leak in v1.48 Pin
    Tnarol14-Nov-07 3:31
    memberTnarol14-Nov-07 3:31 
    AnswerRe: Memory leak in v1.48 Pin
    pjnaughter14-Nov-07 7:22
    memberpjnaughter14-Nov-07 7:22 
    AnswerRe: Memory leak in v1.48 Pin
    pjnaughter17-Nov-07 5:21
    memberpjnaughter17-Nov-07 5:21 
    GeneralA way to make this stay on top... Pin
    Brad Wyckhouse14-Sep-06 10:11
    memberBrad Wyckhouse14-Sep-06 10:11 
    QuestionWhy use multithread here? Pin
    Fzz24-Oct-05 1:32
    memberFzz24-Oct-05 1:32 
    GeneralThere is a newer version available Pin
    SAHorowitz28-Feb-05 15:01
    memberSAHorowitz28-Feb-05 15:01 
    GeneralA little add... Pin
    Isildur7-Oct-04 3:20
    memberIsildur7-Oct-04 3:20 
    GeneralRe: A little add... Pin
    pjnaughter7-Oct-04 8:33
    memberpjnaughter7-Oct-04 8:33 
    GeneralRe: A little add... Pin
    Isildur7-Oct-04 20:27
    memberIsildur7-Oct-04 20:27 
    GeneralGood point Pin
    richard sancenot30-Nov-05 5:44
    memberrichard sancenot30-Nov-05 5:44 
    GeneralSplash Screen Pin
    Abou RRour26-Jun-03 10:07
    memberAbou RRour26-Jun-03 10:07 
    GeneralRe: Splash Screen Pin
    Daniel Madden4-Sep-03 19:55
    memberDaniel Madden4-Sep-03 19:55 
    GeneralUsing this splash screen in a Dialog based application Pin
    melwyn6-May-03 1:29
    membermelwyn6-May-03 1:29 
    GeneralRe: Using this splash screen in a Dialog based application Pin
    pjnaughter6-May-03 11:31
    memberpjnaughter6-May-03 11:31 
    GeneralRe: Using this splash screen in a Dialog based application Pin
    melwyn7-May-03 21:23
    membermelwyn7-May-03 21:23 
    GeneralRe: Using this splash screen in a Dialog based application Pin
    pjnaughter7-May-03 22:13
    memberpjnaughter7-May-03 22:13 
    Generallooking for mfc42u.lib Pin
    ns11-Oct-02 2:21
    memberns11-Oct-02 2:21 
    GeneralRe: looking for mfc42u.lib Pin
    pjnaughter11-Oct-02 3:30
    memberpjnaughter11-Oct-02 3:30 
    GeneralRe: looking for mfc42u.lib Pin
    ns11-Oct-02 3:37
    memberns11-Oct-02 3:37 
    QuestionHow to add and update a progress bar Pin
    ascott6-Mar-02 7:54
    memberascott6-Mar-02 7:54 
    AnswerRe: How to add and update a progress bar Pin
    pjnaughter11-Oct-02 3:33
    memberpjnaughter11-Oct-02 3:33 
    GeneralMy LoginDLG lost focus ... Pin
    David DERUMIER13-Nov-01 5:40
    memberDavid DERUMIER13-Nov-01 5:40 
    GeneralRe: My LoginDLG lost focus ... Pin
    S Fewings6-Jun-02 1:22
    memberS Fewings6-Jun-02 1:22 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Terms of Use | Mobile
    Web03 | 2.8.150603.1 | Last Updated 4 Mar 2000
    Article Copyright 2000 by PJ Naughter
    Everything else Copyright © CodeProject, 1999-2015
    Layout: fixed | fluid