2013-06-02 22:14:25 -04:00
|
|
|
|
#include <MainWindow.hpp>
|
|
|
|
|
#include <commctrl.h>
|
|
|
|
|
|
|
|
|
|
#pragma comment(lib, "comctl32.lib")
|
|
|
|
|
|
2013-09-08 12:03:07 -04:00
|
|
|
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
|
2013-06-02 22:14:25 -04:00
|
|
|
|
UNREFERENCED_PARAMETER(hInstance);
|
|
|
|
|
UNREFERENCED_PARAMETER(hPrevInstance);
|
|
|
|
|
UNREFERENCED_PARAMETER(lpCmdLine);
|
|
|
|
|
InitCommonControls();
|
|
|
|
|
|
|
|
|
|
MainWindow *win = MainWindow::Create(L"Music Keyboard");
|
|
|
|
|
if (win) {
|
|
|
|
|
ShowWindow(win->GetHWND(), nCmdShow);
|
|
|
|
|
MSG msg;
|
|
|
|
|
while (GetMessage(&msg, NULL, 0, 0) > 0) {
|
2014-04-08 19:29:52 -04:00
|
|
|
|
if (msg.message == WM_KEYUP && msg.wParam == VK_ESCAPE) {
|
|
|
|
|
SendMessage(win->GetHWND(), WM_KEYUP, VK_ESCAPE, msg.lParam);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
2013-06-02 22:14:25 -04:00
|
|
|
|
TranslateMessage(&msg);
|
|
|
|
|
DispatchMessage(&msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|