#include "SRApp.h" using namespace SRFramework; HINSTANCE SRFramework::SRApp::s_hInstance = SR_NON_INSTANCE; SHACTIVATEINFO SRFramework::SRApp::s_sai; SRApp::SRApp(HINSTANCE hInstance) :m_hAccelTable(0) { s_hInstance = hInstance; memset(&s_sai, 0, sizeof(s_sai)); s_sai.cbSize = sizeof(s_sai); } SRApp::~SRApp() { } WPARAM SRApp::Run() { MSG msg; // Main message loop: while (GetMessage(&msg, NULL, 0, 0)) { if(!m_hAccelTable || !TranslateAccelerator(msg.hwnd, m_hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return msg.wParam; }