--- np2/wince/np2.cpp 2003/12/01 21:15:13 1.4 +++ np2/wince/np2.cpp 2003/12/26 23:30:26 1.9 @@ -43,6 +43,9 @@ static const TCHAR szClassName[] = STRLI NP2OSCFG np2oscfg = {0, 2, 0, 0, +#if !defined(GX_DLL) + CW_USEDEFAULT, CW_USEDEFAULT, +#endif #if defined(WIN32_PLATFORM_PSPC) 0, 0, #endif @@ -227,6 +230,22 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT } break; +#if !defined(GX_DLL) + case WM_MOVE: +#if !defined(_WIN32_WCE) + if (!(GetWindowLong(hWnd, GWL_STYLE) & + (WS_MAXIMIZE | WS_MINIMIZE))) +#endif + { + RECT rc; + GetWindowRect(hWnd, &rc); + np2oscfg.winx = rc.left; + np2oscfg.winy = rc.top; + sysmng_update(SYS_UPDATEOSCFG); + } + break; +#endif + #if !defined(_WIN32_WCE) case WM_ENTERSIZEMOVE: soundmng_stop(); @@ -250,7 +269,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT if (sysrunning) { if (LOWORD(wParam) != WA_INACTIVE) { GXResume(); -#if defined(WIN32_PLATFORM_PSPC) +#if defined(GX_DLL) scrnmng_enable(TRUE); #endif scrndraw_redraw(); @@ -260,7 +279,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT else { sysrunning &= ~SYSRUNNING_FORE; soundmng_disable(SNDPROC_MAIN); -#if defined(WIN32_PLATFORM_PSPC) +#if defined(GX_DLL) scrnmng_enable(FALSE); #endif GXSuspend(); @@ -289,9 +308,11 @@ static void processwait(UINT cnt) { timing_setcount(0); framereset(cnt); } +#if !defined(_WIN32_WCE) else { Sleep(1); } +#endif } @@ -375,16 +396,17 @@ int WINAPI WinMain(HINSTANCE hInstance, } // } -#if !defined(WIN32_PLATFORM_PSPC) +#if !defined(GX_DLL) hWnd = CreateWindow(szClassName, szAppCaption, WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | WS_MINIMIZEBOX, - 0, 0, FULLSCREEN_WIDTH, FULLSCREEN_HEIGHT, + np2oscfg.winx, np2oscfg.winy, + FULLSCREEN_WIDTH, FULLSCREEN_HEIGHT, NULL, NULL, hInstance, NULL); #else hWnd = CreateWindow(szClassName, szAppCaption, WS_VISIBLE, - 0, 0, + 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), NULL, NULL, hInstance, NULL);