|
|
| version 1.6, 2003/11/21 13:52:07 | version 1.7, 2003/11/22 12:49:49 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | #include "compiler.h" |
| #include <gx.h> | |
| #include "resource.h" | #include "resource.h" |
| #include "strres.h" | #include "strres.h" |
| #include "np2.h" | #include "np2.h" |
| Line 200 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 201 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| // PostQuitMessage(0); | // PostQuitMessage(0); |
| break; | break; |
| case WM_ACTIVATE: | |
| if (LOWORD(wParam) != WA_INACTIVE) { | |
| GXResume(); | |
| scrnmng_enable(TRUE); | |
| scrndraw_redraw(); | |
| soundmng_enable(SNDPROC_MAIN); | |
| } | |
| else { | |
| soundmng_disable(SNDPROC_MAIN); | |
| scrnmng_enable(FALSE); | |
| GXSuspend(); | |
| } | |
| break; | |
| #if defined(WAVEMNG_CBMAIN) | #if defined(WAVEMNG_CBMAIN) |
| case MM_WOM_DONE: | case MM_WOM_DONE: |
| soundmng_cb(MM_WOM_DONE, (HWAVEOUT)wParam, (WAVEHDR *)lParam); | soundmng_cb(MM_WOM_DONE, (HWAVEOUT)wParam, (WAVEHDR *)lParam); |
| Line 314 int WINAPI WinMain(HINSTANCE hInstance, | Line 329 int WINAPI WinMain(HINSTANCE hInstance, |
| if (np2oscfg.resume) { | if (np2oscfg.resume) { |
| id = flagload(str_sav, str_resume, FALSE); | id = flagload(str_sav, str_resume, FALSE); |
| if (id == DID_CANCEL) { | if (id == DID_CANCEL) { |
| DestroyWindow(hWndMain); | DestroyWindow(hWnd); |
| goto np2main_err3; | goto np2main_err3; |
| } | } |
| } | } |
| Line 324 int WINAPI WinMain(HINSTANCE hInstance, | Line 339 int WINAPI WinMain(HINSTANCE hInstance, |
| if (!GetMessage(&msg, NULL, 0, 0)) { | if (!GetMessage(&msg, NULL, 0, 0)) { |
| break; | break; |
| } | } |
| if ((msg.message != WM_SYSKEYDOWN) && | if ((msg.hwnd != hWnd) || |
| (msg.message != WM_SYSKEYUP)) { | ((msg.message != WM_SYSKEYDOWN) && |
| (msg.message != WM_SYSKEYUP))) { | |
| TranslateMessage(&msg); | TranslateMessage(&msg); |
| } | } |
| DispatchMessage(&msg); | DispatchMessage(&msg); |