Well the modeless dialog is a child window of a dialogbox and receives messages from its message pump as side effect.
Try:
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
void *sd = SplashDlgNew(hInstance, NULL, IDB_SPLASH);
SplashDlgShow(sd, 5000);
for(;;);
return 0;
}
Nothing happen, it don't works because the timer message is not routed. No function called GetMessage so no messages queue will be created for this process.
But This Works (even if the process don't terminate):
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
void *sd = SplashDlgNew(hInstance, NULL, IDB_SPLASH);
SplashDlgShow(sd, 5000);
MSG msg;
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;
}
The bitmap is 32bits, but not alpha type. MFC will perform some transformation on the bitmap to make it compatible with alpha channel images.
Where is the original example?
Anyway I'm happy that my code solved your problem!