diff --git a/stepmania/loading.bmp b/stepmania/Data/splash.bmp similarity index 99% rename from stepmania/loading.bmp rename to stepmania/Data/splash.bmp index 34bfbeec41..38adbded45 100644 Binary files a/stepmania/loading.bmp and b/stepmania/Data/splash.bmp differ diff --git a/stepmania/src/arch/LoadingWindow/LoadingWindow_Win32.cpp b/stepmania/src/arch/LoadingWindow/LoadingWindow_Win32.cpp index 2f3006de0d..529fd0e770 100644 --- a/stepmania/src/arch/LoadingWindow/LoadingWindow_Win32.cpp +++ b/stepmania/src/arch/LoadingWindow/LoadingWindow_Win32.cpp @@ -5,8 +5,52 @@ #include "../../resource.h" #include +HBITMAP g_hBitmap = NULL; + + BOOL CALLBACK LoadingWindow_Win32::WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) { + AppInstance handle; + + switch( msg ) + { + case WM_INITDIALOG: + g_hBitmap = + (HBITMAP)LoadImage( + handle.Get(), + "Data\\splash.bmp", + IMAGE_BITMAP, + 0, 0, + LR_LOADFROMFILE ); + break; + case WM_PAINT: + { + if( g_hBitmap ) + { + PAINTSTRUCT ps; + HDC hdcDst = BeginPaint( hWnd, &ps ); + HDC hdcSrc = CreateCompatibleDC( NULL ); + SelectObject( hdcSrc, g_hBitmap ); + BOOL bSuccess = BitBlt( + hdcDst, + 0, 0, + 1000, 1000, // let GDI do the clipping... + hdcSrc, + 0, 0, + SRCCOPY ); + DWORD dwLastError = GetLastError(); + ASSERT( bSuccess ); + EndPaint( hWnd, &ps ); + } + return FALSE; + } + break; + case WM_DESTROY: + DeleteObject( g_hBitmap ); + g_hBitmap = NULL; + break; + } + return FALSE; } diff --git a/stepmania/src/loading.bmp b/stepmania/src/loading.bmp deleted file mode 100644 index 34bfbeec41..0000000000 Binary files a/stepmania/src/loading.bmp and /dev/null differ