Zalgo/src/Zalgo.cpp

31 lines
835 B
C++
Raw Normal View History

2013-03-30 13:05:37 -04:00
#include <MainWindow.hpp>
#include <commctrl.h>
#include <objbase.h>
#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;
}