#include #include #include #pragma comment(lib, "comctl32.lib") #pragma comment(lib, "ole32.lib") class COleInitialize { public: COleInitialize() : m_hr(OleInitialize(NULL)) { } ~COleInitialize() { if (SUCCEEDED(m_hr)) OleUninitialize(); } operator HRESULT() const { return m_hr; } HRESULT m_hr; }; int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) { COleInitialize oleInit; InitCommonControls(); MainWindow *win = MainWindow::Create(L"Unicode Diacritic-Polluted Text Generator"); if (win) { ShowWindow(win->GetHWND(), nCmdShow); MSG msg; while (GetMessage(&msg, NULL, 0, 0) > 0) { TranslateMessage(&msg); DispatchMessage(&msg); } } return 0; }