IRCChannelPage::~IRCChannelPage() { cleanupWindow(); }
ExtensionsWizardPageGeneral::~ExtensionsWizardPageGeneral() { cleanupWindow(); }
IRCConfigWindow::~IRCConfigWindow() { cleanupWindow(); }
LogWindow::~LogWindow() { cleanupWindow(); }
int APIENTRY WinMain(HINSTANCE hCurrentInst, HINSTANCE hPreviousInst, LPSTR lpszCmdLine, int nCmdShow) { openConsoleWindow(); HINSTANCE hinst = hCurrentInst; registerWindowsClass(hinst); setupApplication(); double avg_frame_time = 0.0; double next_frame_time=-1.0, last_frame_time=0.0; int frame_num = 0; ::ShowWindow( hwnd, SW_SHOW ); ::SetForegroundWindow( hwnd ); ::SetFocus( hwnd ); // do the draw/update/event loop MSG msg; bool quit = false; while(!quit) { if( ::PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) ) { if(msg.message == WM_QUIT) { cleanupApplication(); poWindow *win = (poWindow*)GetWindowLongPtr(hwnd,GWL_USERDATA); delete win; cleanupWindow(); break; } ::TranslateMessage( &msg ); ::DispatchMessage( &msg ); } double now = getTiming(); if(now >= next_frame_time) { next_frame_time = now + 1.0 / 60.0; double dt = now - last_frame_time; poWindow *win = (poWindow*)GetWindowLongPtr(hwnd,GWL_USERDATA); if(win) { win->makeCurrent(); win->update(); win->draw(); } SwapBuffers(dc); frame_num++; last_frame_time = now; } else { Sleep(1); } } cleanupWindow(); #if defined WIN32 && defined _DEBUG //_CrtDumpMemoryLeaks(); #endif return msg.wParam; }