fix splash window redraw problems

This commit is contained in:
Chris Danford
2003-09-13 19:09:01 +00:00
parent 6059d5902d
commit 7a3ff956d0
3 changed files with 11 additions and 25 deletions
@@ -22,29 +22,13 @@ BOOL CALLBACK LoadingWindow_Win32::WndProc( HWND hWnd, UINT msg, WPARAM wParam,
IMAGE_BITMAP,
0, 0,
LR_LOADFROMFILE );
SendMessage(
GetDlgItem(hWnd,IDC_SPLASH),
STM_SETIMAGE,
(WPARAM) IMAGE_BITMAP,
(LPARAM) (HANDLE) g_hBitmap );
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;