Register a class for the splash window and create a window using these styles:
- WS
_
POPUPWINDOW: will make sure your window has no caption/sysmenu
- WS
_
EX_
TOPMOST: will keep the splash screen on top of everything. Note that this is a bit intrusive. It might be better to just make the splash window a child of your main window. You may have to manipulate the z-order, though, to keep any other popup windows (if you create any) below the splash screen.
Use CreateDIBSection to load the bitmap. It should be easy, since BMP files are essentially dumps of DIB structures. Or do what Ken said and use LoadImage.
Handle the WM_
PAINT or WM_
ERASEBKGND message to draw the bitmap on the window.
On WM_
CREATE set a timer of 10 seconds and when Windows sends the WM_
TIMER message, have the window destroy itself.