void SetMyMenuItem() { if(CheckOSw2k()){ int i=0, j=0; char buf[32]; DEVMODE *DevMode = CheckScreenMode(); BYTE bpp = (sysInf.bUseBPP24)?24:32; HMENU hsubmenu = CreatePopupMenu(); DeleteMenu( GetSubMenu(sysInf.hMenu,1), ID_DISPFULL, MF_BYCOMMAND ); InsertMenu( GetSubMenu(sysInf.hMenu,1), ID_DISPWINDOW, MF_BYCOMMAND|MF_STRING|MF_POPUP, (unsigned int)hsubmenu, "フルスクリーンモード" ); while(1){ if(!DevMode[i].dmBitsPerPel) break; if( DevMode[i].dmBitsPerPel==bpp && DevMode[i].dmPelsWidth==WIN_SIZEX && DevMode[i].dmPelsHeight==WIN_SIZEY ){ if(DevMode[i].dmDisplayFrequency>=60) { if(DevMode[i].dmDisplayFrequency==60){ wsprintf( buf, "%d hz (標準)", DevMode[i].dmDisplayFrequency ); }else{ wsprintf( buf, "%d hz", DevMode[i].dmDisplayFrequency ); } DispFreq[j] = DevMode[i].dmDisplayFrequency; InsertMenu( hsubmenu, -1, MF_BYPOSITION|MF_STRING, ID_SUBMENU+j++, buf ); } } i++; } DispFreqMax = j; if(sysInf.full_screen){ CheckMenuItem( sysInf.hMenu, ID_SUBMENU+sysInf.full_screen-1, MF_CHECKED ); EnableMenuItem( sysInf.hMenu, ID_SUBMENU+sysInf.full_screen-1, MF_GRAYED ); }else{ CheckMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_CHECKED ); EnableMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_GRAYED ); } }else{ if(sysInf.full_screen){ CheckMenuItem( sysInf.hMenu, ID_DISPFULL, MF_CHECKED ); EnableMenuItem( sysInf.hMenu, ID_DISPFULL, MF_GRAYED ); }else{ CheckMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_CHECKED ); EnableMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_GRAYED ); } } } // SetMyMenuItem
void readProfile() { char privateFile[_MAX_PATH]; int i; GetModuleFileName(sysInf.hInstance,myPath,sizeof(myPath)); for(i=lstrlen(myPath)-1;i>0;i--){ if(myPath[i] == '\\'){ myPath[i] = '\0'; break; } } lstrcpy(privateFile,myPath); lstrcat(privateFile,"\\Routes_mini.INI"); sysInf.bgmVolume = MaxMin(10, GetPrivateProfileInt("System","BGM volume",10,privateFile)); sysInf.voiceVolume = MaxMin(10, GetPrivateProfileInt("System","VOICE volume",10,privateFile)); sysInf.seVolume = MaxMin(10, GetPrivateProfileInt("System","SE volume",10,privateFile)); sysInf.full_screen = MaxMin(1, GetPrivateProfileInt("System","Screen mode",0,privateFile)); sysInf.msgSpeed = MaxMin(10, GetPrivateProfileInt("System","Message speed",6,privateFile)); sysInf.autoMsg = MaxMin(10, GetPrivateProfileInt("System","Auto message",5,privateFile)); sysInf.bAutoRead = MaxMin(1, GetPrivateProfileInt("System","Auto Read",0,privateFile)); sysInf.bAllSkip = MaxMin(1, GetPrivateProfileInt("System","All Skip",1,privateFile)); sysInf.bGEffectSkip = MaxMin(1, GetPrivateProfileInt("System","Graphic Skip",1,privateFile)); sysInf.transparent = MaxMin(100, GetPrivateProfileInt("System","Transparent",50,privateFile)); sysInf.refreshRate = 0; if(sysInf.full_screen){ char workBuf[512]; sysInf.refreshRate = 0; if(CheckOSw2k()){ sysInf.refreshRate = GetPrivateProfileInt("System","Refresh rate",0,privateFile); } if(sysInf.refreshRate>0){ wsprintf(workBuf,"前回の画面設定:\nフルスクリーン,リフレッシュレート:%dHzで起動します。\nよろしいですか?",sysInf.refreshRate); }else{ strcpy(workBuf,"前回の画面設定:\nフルスクリーン,リフレッシュレート:標準で起動します。\nよろしいですか?"); } if(IDNO==MessageBox(NULL,workBuf,"画面切り替え確認",MB_YESNO|MB_ICONQUESTION)){ sysInf.full_screen = 0; sysInf.refreshRate = 0; } } } // readProfile
LRESULT APIENTRY MainWndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ) { int i; PAINTSTRUCT ps; switch( message ){ case WM_CREATE: InitCommonControls(); break; case WM_MOUSEWHEEL: sysInf.zDelta = (short) HIWORD(wParam); break; case WM_DESTROY: case WM_QUIT: case WM_CLOSE: #ifdef _MASTER if(IDYES==MessageBox(sysInf.hWnd,"鎖−クサリ− を終了します。よろしいですか?","終了確認",MB_YESNO)){ sysInf.bGameEnd = on; } #else sysInf.bGameEnd = on; #endif return 0; case WM_ACTIVATE: for(i=0;i<g_iDIDeviceNum;i++){ if(LOWORD(wParam) == WA_INACTIVE){ g_pDIDevice[i]->Unacquire(); }else{ g_pDIDevice[i]->Acquire(); g_pDIDevice[i]->Poll(); } } sysInf.bIsActive = LOWORD(wParam) ? TRUE : FALSE; if(sysInf.bIsActive)myOutputDebugString("ActivateHandle: Active\n"); else myOutputDebugString("ActivateHandle: Non Active\n"); if(sysInf.bIsActive)clearPadState(); break; case WM_KEYDOWN: #ifndef _MASTER switch(wParam){ case (VK_F2): sysInf.bInfo = !sysInf.bInfo; if(!sysInf.bInfo && sysInf.hDebugWnd){ SendMessage(sysInf.hDebugWnd,WM_CLOSE,0,0); }else if(sysInf.bInfo && NULL==sysInf.hDebugWnd){ sysInf.hDebugWnd = CreateDialog( sysInf.hInstance, MAKEINTRESOURCE(IDD_DEBUGWND), sysInf.hWnd, (DLGPROC)DebugDlgProc); } break; } #endif break; case WM_COMMAND: switch( LOWORD(wParam) ){ case ID_END: sysInf.bGameEnd = on; return 0; case ID_MYAPP_EXIT: #ifdef _MASTER if(IDYES==MessageBox(sysInf.hWnd,"鎖−クサリ− を終了します。よろしいですか?","終了確認",MB_YESNO)){ sysInf.bGameEnd = on; } #else sysInf.bGameEnd = on; #endif return 0; case ID_DISPCHANGE: if(0==sysInf.full_screen){ if(CheckOSw2k()){ SendMessage(hWnd,WM_COMMAND,ID_SUBMENU,0); }else{ SendMessage(hWnd,WM_COMMAND,ID_DISPFULL,0); } }else{ SendMessage(hWnd,WM_COMMAND,ID_DISPWINDOW,0); } break; case ID_DISPFULL: if(lpMovie) return 0; ScreenChange(1,0); EnableMenuItem( sysInf.hMenu,ID_DISPFULL, MF_GRAYED ); CheckMenuItem( sysInf.hMenu, ID_DISPFULL, MF_CHECKED ); EnableMenuItem( sysInf.hMenu,ID_DISPWINDOW, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_UNCHECKED ); break; case ID_DISPWINDOW: if(lpMovie) return 0; ScreenChange(0,0); if(CheckOSw2k()){ for(i=0;i<DispFreqMax;i++){ EnableMenuItem( sysInf.hMenu, ID_SUBMENU+i, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_SUBMENU+i, MF_UNCHECKED ); } }else{ EnableMenuItem( sysInf.hMenu, ID_DISPFULL, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_DISPFULL, MF_UNCHECKED ); } EnableMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_GRAYED ); CheckMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_CHECKED ); break; case ID_SUBMENU: case ID_SUBMENU+1: case ID_SUBMENU+2: case ID_SUBMENU+3: case ID_SUBMENU+4: case ID_SUBMENU+5: case ID_SUBMENU+6: case ID_SUBMENU+7: if(lpMovie) return 0; ScreenChange( wParam-ID_SUBMENU+1 ,TRUE); for(i=0;i<DispFreqMax;i++){ EnableMenuItem( sysInf.hMenu, ID_SUBMENU+i, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_SUBMENU+i, MF_UNCHECKED ); } EnableMenuItem( sysInf.hMenu, LOWORD(wParam), MF_GRAYED ); CheckMenuItem( sysInf.hMenu, LOWORD(wParam), MF_CHECKED ); EnableMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_UNCHECKED ); break; case ID_AUTOREAD: msgWnd.toggleAutoRead(); break; case ID_READSKIP: msgWnd.toggleMessageSkip(); break; case ID_UPDATE: ShellExecute( sysInf.hWnd, NULL, "http://leaf.aquaplus.co.jp", NULL, NULL, SW_SHOWNORMAL ); break; case ID_VER: DialogBox( sysInf.hInstance, MAKEINTRESOURCE(IDD_ABOUTDIALOG), sysInf.hWnd, AboutDialogBoxProc ); break; case ID_SYSTEMINFO: DialogBox( sysInf.hInstance, MAKEINTRESOURCE(IDD_INFODIALOG), sysInf.hWnd, InfoDialogBoxProc ); break; case ID_CONFIG: if(NULL==optionWnd) optionWnd = new OptionMode; break; #ifndef _MASTER case ID_FLAGEDIT: DialogBox( sysInf.hInstance, MAKEINTRESOURCE(IDD_FLAGEDIT), sysInf.hWnd, FlagDialogBoxProc ); break; #endif case ID_LOADEXEC: if(ESC_GetFlag(_セーブロード無効))break; switch(sysInf.execMode){ case event_exec_mode: case select_exec_mode: case opening_mode: if(NULL==EXEC_LangBuf){ EXEC_LangBuf = (char *)&LangData.LangBuf; EXEC_LangInfo = &LangData; } if(NULL==saveWnd)saveWnd = new SaveWnd(load_mode); break; } break; case ID_SAVEEXEC: if(ESC_GetFlag(_セーブロード無効))break; if(NULL==EXEC_LangBuf)break; switch(sysInf.execMode){ case event_exec_mode: case select_exec_mode: if(NULL==saveWnd)saveWnd = new SaveWnd(save_mode); break; } break; case ID_BACKTITLE: ReturnTitile(TRUE); break; case ID_BACKSELECT: SAV_Load( 98 ); break; case ID_MOVIEHI: sysInf.movieQuality = 2; CheckMenuItem( sysInf.hMenu, ID_MOVIEHI, MF_CHECKED ); CheckMenuItem( sysInf.hMenu, ID_MOVIEMID, MF_UNCHECKED ); CheckMenuItem( sysInf.hMenu, ID_MOVIELOW, MF_UNCHECKED ); break; case ID_MOVIEMID: sysInf.movieQuality = 1; CheckMenuItem( sysInf.hMenu, ID_MOVIEHI, MF_UNCHECKED ); CheckMenuItem( sysInf.hMenu, ID_MOVIEMID, MF_CHECKED ); CheckMenuItem( sysInf.hMenu, ID_MOVIELOW, MF_UNCHECKED ); break; case ID_MOVIELOW: sysInf.movieQuality = 0; CheckMenuItem( sysInf.hMenu, ID_MOVIEHI, MF_UNCHECKED ); CheckMenuItem( sysInf.hMenu, ID_MOVIEMID, MF_UNCHECKED ); CheckMenuItem( sysInf.hMenu, ID_MOVIELOW, MF_CHECKED ); break; case ID_NOUSEOVERLAY: sysInf.nouseOverlay = !sysInf.nouseOverlay; if(sysInf.nouseOverlay){ CheckMenuItem( sysInf.hMenu, ID_NOUSEOVERLAY, MF_CHECKED ); }else{ CheckMenuItem( sysInf.hMenu, ID_NOUSEOVERLAY, MF_UNCHECKED ); } break; case ID_FPS60: sysInf.setFPS = 2; CheckMenuItem( sysInf.hMenu, ID_FPS60, MF_CHECKED ); CheckMenuItem( sysInf.hMenu, ID_FPS30, MF_UNCHECKED ); CheckMenuItem( sysInf.hMenu, ID_FPS20, MF_UNCHECKED ); break; case ID_FPS30: sysInf.setFPS = 1; CheckMenuItem( sysInf.hMenu, ID_FPS60, MF_UNCHECKED ); CheckMenuItem( sysInf.hMenu, ID_FPS30, MF_CHECKED ); CheckMenuItem( sysInf.hMenu, ID_FPS20, MF_UNCHECKED ); break; case ID_FPS20: sysInf.setFPS = 0; CheckMenuItem( sysInf.hMenu, ID_FPS60, MF_UNCHECKED ); CheckMenuItem( sysInf.hMenu, ID_FPS30, MF_UNCHECKED ); CheckMenuItem( sysInf.hMenu, ID_FPS20, MF_CHECKED ); break; } break; case WM_SYSCOMMAND: if(sysInf.full_screen){ switch (wParam) { case SC_KEYMENU : return 0; } }else{ switch(wParam & 0xfff0){ case SC_MAXIMIZE: if(lpMovie) return 0; ScreenChange(1,0); EnableMenuItem( sysInf.hMenu,ID_DISPFULL, MF_GRAYED ); CheckMenuItem( sysInf.hMenu, ID_DISPFULL, MF_CHECKED ); EnableMenuItem( sysInf.hMenu,ID_DISPWINDOW, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_UNCHECKED ); return 0; } } break; case WM_DISPLAYCHANGE: if(!sysInf.bDisplayChange)break; SetTimer(sysInf.hWnd, 1, 500, NULL); break; case WM_TIMER: if(!sysInf.bDisplayChange || 1!=wParam)break; KillTimer(sysInf.hWnd, wParam); if(0==sysInf.full_screen){ MoveWindow(sysInf.hWnd, (GetSystemMetrics(SM_CXSCREEN)-sysInf.ScreenW)/2,(GetSystemMetrics(SM_CYSCREEN)-sysInf.ScreenH)/2, sysInf.ScreenW +GetSystemMetrics(SM_CXDLGFRAME)*2, sysInf.ScreenH +GetSystemMetrics(SM_CYDLGFRAME)*2 +GetSystemMetrics(SM_CYBORDER)+GetSystemMetrics(SM_CYSIZE) +GetSystemMetrics(SM_CYMENU), TRUE); }else{ MoveWindow(sysInf.hWnd, 0, 0, sysInf.ScreenW, sysInf.ScreenH, TRUE); if(NULL==sysInf.hMenuWnd){ sysInf.hMenuWnd = CreateWindow(className,"menuWnd",WS_POPUP, 0,0, WIN_SIZEX,GetSystemMetrics(SM_CYMENUSIZE),sysInf.hWnd,sysInf.hMenu,sysInf.hInstance,NULL); } } sysInf.bDisplayChange = FALSE; break; case WM_PAINT: if(lpMovie){ myOutputDebugString("movie WM_PAINT\n"); if(lpMovie->forccNum<3){ BeginPaint( sysInf.hWnd, &ps ); EndPaint( sysInf.hWnd, &ps ); } }else{ BeginPaint( sysInf.hWnd, &ps ); BitBlt( ps.hdc, 0, 0, WIN_SIZEX, WIN_SIZEY, g_DibInf.memDC, 0, 0, SRCCOPY ); EndPaint( sysInf.hWnd, &ps ); } break; case WM_SETCURSOR: default: break; } return DefWindowProc(hWnd, message, wParam, lParam); } // MainWndProc
LRESULT APIENTRY MainWndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ) { int i; PAINTSTRUCT ps; switch( message ){ case WM_CREATE: InitCommonControls(); break; case WM_MOUSEWHEEL: sysInf.zDelta = (short) HIWORD(wParam); break; case WM_DESTROY: case WM_QUIT: case WM_CLOSE: if(IDYES==MessageBox(sysInf.hWnd,"アルルゥとあそぼ!!を終了してよろしいですか?","終了確認",MB_YESNO)){ sysInf.bGameEnd = on; } return 0; case WM_ACTIVATE: for(i=0;i<g_iDIDeviceNum;i++){ if(LOWORD(wParam) == WA_INACTIVE){ g_pDIDevice[i]->Unacquire(); }else{ g_pDIDevice[i]->Acquire(); g_pDIDevice[i]->Poll(); } } sysInf.bIsActive = LOWORD(wParam) ? TRUE : FALSE; myOutputDebugString("ActivateHandle: "); if(sysInf.bIsActive)myOutputDebugString("Active\n"); else myOutputDebugString("Non Active\n"); if(sysInf.bIsActive)clearPadState(); break; case WM_COMMAND: switch( LOWORD(wParam) ){ case ID_MYAPP_EXIT: if(IDYES==MessageBox(sysInf.hWnd,"アルルゥとあそぼ!!を終了してよろしいですか?","終了確認",MB_YESNO)){ sysInf.bGameEnd = on; } return 0; case ID_DISPCHANGE: if(lpMovie) lpMovie->StopMovie(); if(0==sysInf.full_screen){ if(CheckOSw2k()){ ScreenChange( 1 ,TRUE); for(i=0;i<DispFreqMax;i++){ EnableMenuItem( sysInf.hMenu, ID_SUBMENU+i, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_SUBMENU+i, MF_UNCHECKED ); } EnableMenuItem( sysInf.hMenu, ID_SUBMENU, MF_GRAYED ); CheckMenuItem( sysInf.hMenu, ID_SUBMENU, MF_CHECKED ); EnableMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_UNCHECKED ); }else{ ScreenChange(1,0); EnableMenuItem( sysInf.hMenu,ID_DISPFULL, MF_GRAYED ); CheckMenuItem( sysInf.hMenu, ID_DISPFULL, MF_CHECKED ); EnableMenuItem( sysInf.hMenu,ID_DISPWINDOW, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_UNCHECKED ); } }else{ ScreenChange(0,0); if(CheckOSw2k()){ for(i=0;i<DispFreqMax;i++){ EnableMenuItem( sysInf.hMenu, ID_SUBMENU+i, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_SUBMENU+i, MF_UNCHECKED ); } }else{ EnableMenuItem( sysInf.hMenu, ID_DISPFULL, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_DISPFULL, MF_UNCHECKED ); } EnableMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_GRAYED ); CheckMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_CHECKED ); } break; case ID_DISPFULL: if(lpMovie) lpMovie->StopMovie(); ScreenChange(1,0); EnableMenuItem( sysInf.hMenu,ID_DISPFULL, MF_GRAYED ); CheckMenuItem( sysInf.hMenu, ID_DISPFULL, MF_CHECKED ); EnableMenuItem( sysInf.hMenu,ID_DISPWINDOW, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_UNCHECKED ); break; case ID_DISPWINDOW: if(lpMovie) lpMovie->StopMovie(); ScreenChange(0,0); if(CheckOSw2k()){ for(i=0;i<DispFreqMax;i++){ EnableMenuItem( sysInf.hMenu, ID_SUBMENU+i, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_SUBMENU+i, MF_UNCHECKED ); } }else{ EnableMenuItem( sysInf.hMenu, ID_DISPFULL, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_DISPFULL, MF_UNCHECKED ); } EnableMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_GRAYED ); CheckMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_CHECKED ); break; case ID_SUBMENU: case ID_SUBMENU+1: case ID_SUBMENU+2: case ID_SUBMENU+3: case ID_SUBMENU+4: case ID_SUBMENU+5: case ID_SUBMENU+6: case ID_SUBMENU+7: if(lpMovie) lpMovie->StopMovie(); ScreenChange( wParam-ID_SUBMENU+1 ,TRUE); for(i=0;i<DispFreqMax;i++){ EnableMenuItem( sysInf.hMenu, ID_SUBMENU+i, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_SUBMENU+i, MF_UNCHECKED ); } EnableMenuItem( sysInf.hMenu, LOWORD(wParam), MF_GRAYED ); CheckMenuItem( sysInf.hMenu, LOWORD(wParam), MF_CHECKED ); EnableMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_ENABLED ); CheckMenuItem( sysInf.hMenu, ID_DISPWINDOW, MF_UNCHECKED ); break; case ID_AUTOREAD: sysInf.bAutoRead = !sysInf.bAutoRead; if(sysInf.bAutoRead){ CheckMenuItem( sysInf.hMenu, ID_AUTOREAD, MF_CHECKED ); }else{ CheckMenuItem( sysInf.hMenu, ID_AUTOREAD, MF_UNCHECKED ); } break; case ID_READSKIP: sysInf.bReadSkip = !sysInf.bReadSkip; if(sysInf.bReadSkip){ CheckMenuItem( sysInf.hMenu, ID_READSKIP, MF_CHECKED ); sysInf.bAlreadyRead = AVG_CheckScenarioFlag(); }else{ CheckMenuItem( sysInf.hMenu, ID_READSKIP, MF_UNCHECKED ); } break; case ID_UPDATE: ShellExecute( sysInf.hWnd, NULL, "http://leaf.aquaplus.co.jp", NULL, NULL, SW_SHOWNORMAL ); break; case ID_VER: DialogBox( sysInf.hInstance, MAKEINTRESOURCE(IDD_ABOUTDIALOG), sysInf.hWnd, AboutDialogBoxProc ); break; case ID_CONFIG: DialogBox( sysInf.hInstance, MAKEINTRESOURCE(IDD_CONFIGDIALOG), sysInf.hWnd, ConfDialogBoxProc ); break; case ID_LOADEXEC: if(lpMovie)break; if(NULL==EXEC_LangBuf){ EXEC_LangBuf = (char *)&LangData.LangBuf; EXEC_LangInfo = &LangData; } if(NULL==saveWnd)saveWnd = new SaveWnd(load_mode); break; case ID_SAVEEXEC: if(lpMovie || NULL==EXEC_LangBuf)break; if(NULL==saveWnd)saveWnd = new SaveWnd(save_mode); break; case ID_BACKTITLE: selectWnd.selectEnd(); ESC_InitEOprFlag(); lpSoundDS->ChangeMusic(bgmHandle,pack_bgmfile,2,FALSE,0); my_delete(lpMenuWnd); my_delete(lpKabeSetWnd); my_delete(lpStaffmodeWnd); my_delete(lpStaffRoll); my_delete(lpMovie); lpMovie = new CMovie; lpMovie->OpenMovie("title.avi",-1,TRUE); break; } break; case WM_SYSCOMMAND: if(sysInf.full_screen){ switch (wParam) { case SC_KEYMENU : return 0; } } break; case WM_DISPLAYCHANGE: if(!sysInf.bDisplayChange)break; SetTimer(sysInf.hWnd,1,500,NULL); break; case WM_TIMER: if(!sysInf.bDisplayChange || 1!=wParam)break; KillTimer(sysInf.hWnd,1); if(0==sysInf.full_screen){ MoveWindow(sysInf.hWnd, (GetSystemMetrics(SM_CXSCREEN)-sysInf.ScreenW)/2,(GetSystemMetrics(SM_CYSCREEN)-sysInf.ScreenH)/2, sysInf.ScreenW +GetSystemMetrics(SM_CXDLGFRAME)*2, sysInf.ScreenH +GetSystemMetrics(SM_CYDLGFRAME)*2 +GetSystemMetrics(SM_CYBORDER)+GetSystemMetrics(SM_CYSIZE) +GetSystemMetrics(SM_CYMENU), TRUE); }else{ MoveWindow(sysInf.hWnd, 0, 0, sysInf.ScreenW, sysInf.ScreenH, TRUE); if(NULL==sysInf.hMenuWnd){ sysInf.hMenuWnd = CreateWindow(className,"menuWnd",WS_POPUP, 0,0, WIN_SIZEX,GetSystemMetrics(SM_CYMENUSIZE),sysInf.hWnd,sysInf.hMenu,sysInf.hInstance,NULL); } } sysInf.bDisplayChange = FALSE; break; case WM_PAINT: if(lpMovie)break; BeginPaint( sysInf.hWnd, &ps ); BitBlt( ps.hdc, 0, 0, WIN_SIZEX, WIN_SIZEY, g_DibInf.memDC, 0, 0, SRCCOPY ); EndPaint( sysInf.hWnd, &ps ); break; case WM_SETCURSOR: default: break; } return DefWindowProc(hWnd, message, wParam, lParam); } // MainWndProc