void CAnotherView::ShowOutStockquery(bool showflag) { CreateWindows(); cbmp.ShowWindow(false); cgatherin.ShowWindow(false); cgatherout.ShowWindow(false); cindetail.ShowWindow(false); coutdetail.ShowWindow(false); cinstockmange.ShowWindow(false); coutstockmange.ShowWindow(false); cinstockquery.ShowWindow(false); coutstockquery.ShowWindow(true); }
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // Register the main window class WindowClass wndClass( KWindowClass, WndProc ); // Create all of the windows CreateWindows(); // Create the "sink" window that handles the timer to update all other windows HWND hWnd = CreateWindowA( KWindowClass, KWindowTitle, WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, // style CW_USEDEFAULT, //x 0, // y 1, // w 1, // h NULL, // Parent NULL, // hMenu hInstance, NULL); DWORD gle = GetLastError(); // Update the new window UpdateWindow(hWnd); // Add the tray icon AddTrayIcon(hWnd); // Main message loop MSG msg; while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } for ( unsigned int i=0; i<g_windows.size(); i++ ) { delete g_windows[i]; } return (int) msg.wParam; }
void Scene_Battle::Start() { if (Player::battle_test_flag) { Game_Temp::battle_troop_id = Player::battle_test_troop_id; } if (Game_Temp::battle_troop_id <= 0 || Game_Temp::battle_troop_id > (int)Data::troops.size()) { Output::Warning("Invalid Monster Party Id %d", Game_Temp::battle_troop_id); Game_Temp::battle_result = Game_Temp::BattleVictory; Scene::Pop(); return; } if (Player::battle_test_flag) { InitBattleTest(); } else { Main_Data::game_enemyparty.reset(new Game_EnemyParty()); Main_Data::game_enemyparty->Setup(Game_Temp::battle_troop_id); } Game_Battle::Init(); cycle = 0; auto_battle = false; enemy_action = NULL; CreateCursors(); CreateWindows(); screen.reset(new Screen()); Game_Temp::map_bgm = NULL; // Play map BGM on Scene_Map return Game_System::BgmPlay(Data::system.battle_music); Game_System::SePlay(Data::system.battle_se); if (!Game_Temp::battle_background.empty()) background.reset(new Background(Game_Temp::battle_background)); else background.reset(new Background(Game_Temp::battle_terrain_id)); SetState(State_Start); }
int main(int argc, char *argv[100]) { int j = 0; srand( (unsigned)time( NULL ) ); InitCurses(); CheckScreenSize(); CreateWindows(29, 28, 1, 1); //If they specified a level to load if((argc > 1) && (strlen(argv[1]) > 1)) { argv[1][99] = '\0'; LoadLevel(argv[1]); MainLoop(); } //If not, display intro screen then use default levels else { //Show intro "movie" IntroScreen(); j = 1; //They want to start at a level 1-9 if(argc > 1) for(LevelNumber = '1'; LevelNumber <= '9'; LevelNumber++) if(LevelNumber == argv[1][0]) j = LevelNumber - '0'; //Load 9 levels, 1 by 1, if you can beat all 9 levels in a row, you're awesome for(LevelNumber = j; LevelNumber < 10; LevelNumber++) { LevelFile[strlen(LevelFile) - 6] = '0'; LevelFile[strlen(LevelFile) - 5] = LevelNumber + '0'; LoadLevel(LevelFile); Invincible = 0; //Reset invincibility MainLoop(); } } ExitProgram("Good bye!"); }
int main(int argc, char* argv[]) { #if defined(_WIN32) && defined(VIDEO) CreateWindows(); DWORD dwThreadId = 0; CmdParams cmdParams; cmdParams.argc = argc; cmdParams.argv = argv; HANDLE hThread = CreateThread(NULL, 0, ConsoleStart, &cmdParams, 0, &dwThreadId); MSG msg; while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return 0; #else return local_main(argc, argv); #endif }
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil) { int result = EF5_ERROR_SUCCESS; if (!CreateWindows(hInstance)) { MessageBox(0, "Failed to create the needed windows.", "EF5", MB_ICONERROR); return EF5_ERROR_INVALIDCONF; } PrintStartupMessage(); _putenv("TZ=UTC"); _tzset(); g_config = new Config((lpszArgument[0]) ? lpszArgument : "control.txt"); if (g_config->ParseConfig() != CONFIG_SUCCESS) { result = EF5_ERROR_INVALIDCONF; } else { hThread = (HANDLE)_beginthread(threadProc, 0, NULL); } MsgLoop(); DestroyWindows(); (void)hPrevInstance; (void)lpszArgument; (void)nFunsterStil; return result; }
static void test_GetNextDlgItem(void) { static test_record test [] = { /* isok test dlg ctl tab prev res */ { 1, 1, 6, 0, 0, 1, 0}, { 1, 2, 6, 0, 1, 1, 0}, { 1, 3, 6, 6, 0, 1, 0}, { 1, 4, 6, 6, 1, 1, 0}, { 1, 5, 6, 0, 0, 0, 66}, { 1, 6, 6, 0, 1, 0, 67}, { 1, 7, 6, 6, 0, 0, 66}, { 1, 8, 6, 6, 1, 0, 67}, { 1, 9, 4, 83, 1, 0, 84}, { 1, 10, 4, 83, 0, 0, 5}, { 1, 11, 5, 81, 1, 0, 67}, { 1, 12, 5, 81, 0, 0, 66}, { 1, 13, 5, 82, 1, 1, 78}, { 1, 14, 5, 82, 0, 1, 79}, { 1, 15, 6, 70, 0, 0, 72}, { 1, 16, 6, 72, 0, 0, 25}, { 1, 17, 6, 75, 0, 0, 26}, { 1, 18, 6, 77, 0, 0, 76}, { 1, 19, 6, 79, 0, 0, 66}, { 1, 20, 6, 71, 0, 0, 72}, { 1, 21, 6, 64, 0, 0, 66}, { 1, 22, 6, 25, 0, 0, 70}, { 1, 23, 6, 68, 0, 0, 68}, { 1, 24, 6, 25, 0, 1, 72}, { 1, 25, 1, 70, 0, 0, 72}, /*{ 0, 26, 1, 70, 0, 1, 3}, Crashes Win95*/ { 1, 27, 1, 70, 1, 0, 72}, /*{ 0, 28, 1, 70, 1, 1, 61}, Crashes Win95*/ { 1, 29, 6, 67, 1, 0, 72}, { 1, 30, 6, 72, 1, 1, 67}, { 1, 35, 2, 0, 0, 0, 60}, { 1, 36, 2, 0, 1, 0, 60}, { 0, 0, 0, 0, 0, 0, 0} /* End of test */ }; const test_record *p = test; ok (CreateWindows (g_hinst), "Could not create test windows\n"); while (p->dlg) { HWND a; a = (p->tab ? GetNextDlgTabItem : GetNextDlgGroupItem) (hwnd[p->dlg], hwnd[p->ctl], p->prev); if (p->isok) { ok (a == hwnd[p->res], "Test %d: %s %s item of %d in %d was %d instead of %d\n", p->test, p->prev ? "Prev" : "Next", p->tab ? "Tab" : "Group", p->ctl, p->dlg, id(a), p->res); } else { todo_wine { ok (a == hwnd[p->res], "Test %d: %s %s item of %d in %d was actually %d matching expected %d\n", p->test, p->prev ? "Prev" : "Next", p->tab ? "Tab" : "Group", p->ctl, p->dlg, id(a), p->res); } } p++; } }