|
|
| version 1.12, 2003/10/26 11:51:46 | version 1.13, 2003/10/28 13:03:48 |
|---|---|
| Line 834 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 834 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| case WM_PAINT: | case WM_PAINT: |
| hdc = BeginPaint(hWnd, &ps); | hdc = BeginPaint(hWnd, &ps); |
| if (np2opening) { | if (np2opening) { |
| HINSTANCE hinst; | HINSTANCE hinst; |
| RECT rect; | RECT rect; |
| int width; | int width; |
| int height; | int height; |
| HBITMAP hbmp; | HBITMAP hbmp; |
| BITMAP bmp; | BITMAP bmp; |
| HDC hmdc; | HDC hmdc; |
| HBRUSH hbrush; | HBRUSH hbrush; |
| hinst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE); | hinst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE); |
| GetClientRect(hWnd, &rect); | GetClientRect(hWnd, &rect); |
| width = rect.right - rect.left; | width = rect.right - rect.left; |
| height = rect.bottom - rect.top; | height = rect.bottom - rect.top; |
| hbmp = LoadBitmap(hinst, "NP2BMP"); | hbmp = LoadBitmap(hinst, "NP2BMP"); |
| GetObject(hbmp, sizeof(BITMAP), &bmp); | GetObject(hbmp, sizeof(BITMAP), &bmp); |
| hbrush = (HBRUSH)SelectObject(hdc, | hbrush = (HBRUSH)SelectObject(hdc, |
| GetStockObject(BLACK_BRUSH)); | GetStockObject(BLACK_BRUSH)); |
| PatBlt(hdc, 0, 0, width, height, PATCOPY); | PatBlt(hdc, 0, 0, width, height, PATCOPY); |
| SelectObject(hdc, hbrush); | SelectObject(hdc, hbrush); |
| hmdc = CreateCompatibleDC(hdc); | hmdc = CreateCompatibleDC(hdc); |
| SelectObject(hmdc, hbmp); | SelectObject(hmdc, hbmp); |
| BitBlt(hdc, (width - bmp.bmWidth) / 2, | BitBlt(hdc, (width - bmp.bmWidth) / 2, |
| (height - bmp.bmHeight) / 2, | (height - bmp.bmHeight) / 2, |
| bmp.bmWidth, bmp.bmHeight, hmdc, 0, 0, SRCCOPY); | bmp.bmWidth, bmp.bmHeight, hmdc, 0, 0, SRCCOPY); |
| DeleteDC(hmdc); | DeleteDC(hmdc); |
| DeleteObject(hbmp); | DeleteObject(hbmp); |
| } | } |
| else { | else { |
| // scrnmng_update(); | // scrnmng_update(); |