Splasher
v1.3
Welcome to Splasher, A freeware MFC
class to implement a splash screen.
Features
The 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 customised 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 colour screens and a 256 colour bitmap for higher screen
depths. You could also allow your end user to customise the splash screen.
- The palette from the DIB is read and is used to provide support for
more colours that the standard 16 which are available with resources by default.
- The splash screen component is multi-threaded, meaning that it
remains responsive and redraws itself correctly while you can be starting up your
application in the normal MFC 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)
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 initialised 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 on 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.
CONTACTING
THE AUTHOR
PJ Naughter
Email: pjn@indigo.ie
Web: http://indigo.ie/~pjn
22nd December 1998