fix splash window redraw problems
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user