Click here to Skip to main content
15,069,838 members
Articles / Desktop Programming / MFC
Posted 24 Apr 2004


34 bookmarked

Splash screen with contents of the <b>VERSIONINFO</b>

Rate me:
Please Sign up or sign in to vote.
4.33/5 (24 votes)
24 Apr 20042 min read
Easy to implement splash screen for dialog based applications that <b>displays the contents of VERSIONINFO</b>. Look at this!

Sample Image - CSplashWnd_Extended.gif


This Splash screen is a composite:

  • CSplashWnd comes from CODEJOCK Software
  • CModuleVersion comes from Paul DiLascia / Microsoft Systems Journal 1998

Both of the above classes are edited (more or less) to suit my needs.


With one simple call to a static function, you are able to show a Splash screen in your Dialog based application. The Splash screen gets its information out of the VERSIONINFO which is filled in by you.

Using the code

If you're not already finished with it, fill in the VERSIONINFO of your resources:

  1. Add:
    #include "SplashWnd.h"
  2. Add the virtual function PreTranslateMessage(MSG* pMsg) to your Main Dialog class and paste the following code to the function body:
    // Route messages to the splash screen while it is visible
            return TRUE;
  3. Next,
    • 3.1. Call the static function
      SetInfo(BOOL bCompanyName, BOOL bCopyright, 
              BOOL bFileVersion, BOOL bProductName);

      in the OnInitDialog part of your Main Dialog class. The BOOLs tell the next function which of the four VERSIONINFOs should be used! In case you want to display all of the above mentioned information, just don't use this function.

    • 3.2 Call the static function
      CSplashWnd::ShowSplashScreen(UINT uTimeOut, 
                  UINT uBitmapID, CWnd* pParentWnd = NULL)

      in the OnInitDialog part of your Main Dialog class.

      • uTimeOut is the amount of time in milliseconds to display the Splash screen (if no other action occurs).
      • uBitmapID is the ID of the bitmap to display.
      • pParentWnd is the Parent window.

    Updated/added 28.04.2004:

  4. If you want to close the SplashScreen for whatever reason you have, call the static member.

    e.g.: call the function right before the end of OnInitDialog part of your Main Dialog class.

    That's all there is to do. If you want to change the text color, give the member COLORREF m_crTextCol of class CSplashWnd another value.

Some infos

I don't like messing around with image-editors, so I had the idea to display the version information which is already there. After some hours attempting to get the version information out of an executable, I looked in the Internet and found Paul DiLascia's very, very useful class. Then I used CODEJOCK's class and built support to display a Bitmap as background, stretch it if necessary (depends on the length of the information), and bring it all on the Bitmap.

It's like everything else. This class can be better, faster and maybe makes coffee. So feel free to change or add functions. Use this as a base for your own Splash screen or whatever.......

Have Phun! ;-)


  • Last update: 28.04.2004


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


About the Author

Thomas Latuske
Web Developer
Germany Germany
My name is Thomas, I'm born on January the 11th in
1970, right now I'm working in the Quality department
of a big Pipe mill as a Technician.
My hobbies are my girl friend, my car, RC-Planes and
Computers. I begun with VC++ some time ago and now
Programming is like a drug to me (I'm still a
beginner). I want to learn it all in a blink of an
eye Wink | ;-) but i know that this is not possible. It's
real fun for me and I do small Programms for my own
O.K. enough written..... I need my Time to debug
everything that crosses my way! Wink | ;-)

Comments and Discussions

GeneralCOM,COM+,DCOM Pin
ciitpk30-Jul-04 2:40
Memberciitpk30-Jul-04 2:40 
GeneralRe: COM,COM+,DCOM Pin
Thomas Latuske30-Jul-04 5:33
MemberThomas Latuske30-Jul-04 5:33 
Generalit needs clicking... Pin
radumoiceanu27-Apr-04 14:23
Memberradumoiceanu27-Apr-04 14:23 
GeneralRe: it needs clicking... Pin
Thomas Latuske28-Apr-04 6:53
MemberThomas Latuske28-Apr-04 6:53 
GeneralNo marquee please Pin
Thomas Freudenberg26-Apr-04 4:07
MemberThomas Freudenberg26-Apr-04 4:07 
GeneralRe: No marquee please Pin
Thomas Latuske26-Apr-04 7:05
MemberThomas Latuske26-Apr-04 7:05 
GeneralRe: No marquee please Pin
Thomas Freudenberg26-Apr-04 21:29
MemberThomas Freudenberg26-Apr-04 21:29 
GeneralGood Pin
ajhuddy25-Apr-04 18:40
Memberajhuddy25-Apr-04 18:40 
GeneralRe: Good Pin
Thomas Latuske26-Apr-04 7:04
MemberThomas Latuske26-Apr-04 7:04 
GeneralRe: Good Pin
Michael Pearce23-May-04 18:00
MemberMichael Pearce23-May-04 18:00 
GeneralRe: Good Pin
Thomas Latuske24-May-04 7:48
MemberThomas Latuske24-May-04 7:48 

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

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