How to create a SPLASH image using C++

I bet someone knows how, whats the programming to create a image splash before program launch?
Use std::cout....?
closed account (S6k9GNh0)
>.>

I believe he means the splash image like in UT2004 or in other games or apps that comes up while it's allocating memory...
+1 for the crossplatform lib solution.

However if you're trying to stick to Windows calls for whatever reason (break the habit! Crossplatform for the win!), I believe the way it's traditionally done is:

1) Create a popup window (no border, titlebar, caption, or anything like that)
2) Center that window on screen (GetSystemMetrics can be used to get the current screen resolution, from which you can calculate where your window needs to be in order to be centered)
3) Draw your splash image to it
4) Display it
5) Run a timer for a few seconds
6) Destroy the window


If you want a non-rectangular, or transparent window, you'll need to stop WM_ERASEBACKGROUND (or WM_ERASEBG, I forget the exact message -- you can look it up) so that it doesn't clear what you're drawing over before you draw.
It's a Win32 FAQ
See the well-known MS code (MSDN)

Addition:
the splash screen can be created in a thread.. as soon the main windows comes up, the splash window will close itself..
or else as soon some one clicks on the splash window it will be closed.
closed account (S6k9GNh0)
It depends on what you want a splash screen for.
Topic archived. No new replies allowed.