2019-06-07 02:24:28 -04:00
|
|
|
|
#include "common.h"
|
2019-06-09 08:10:44 -04:00
|
|
|
|
#include "defs.h"
|
2019-06-07 02:24:28 -04:00
|
|
|
|
#include "resource.h"
|
|
|
|
|
|
|
|
|
|
wchar_t buffer[1000] = {};
|
|
|
|
|
std::array<int, 10> vars = {};
|
|
|
|
|
|
2019-06-09 07:56:23 -04:00
|
|
|
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
|
2019-06-07 02:24:28 -04:00
|
|
|
|
{
|
2019-06-09 08:10:44 -04:00
|
|
|
|
LoadLibraryW(ITH_DLL);
|
|
|
|
|
|
2019-06-07 02:24:28 -04:00
|
|
|
|
ShowWindow(CreateDialogParamW(hInstance, MAKEINTRESOURCEW(IDD_DIALOG1), NULL, [](HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -> INT_PTR
|
|
|
|
|
{
|
|
|
|
|
switch (uMsg)
|
|
|
|
|
{
|
|
|
|
|
case WM_CLOSE:
|
|
|
|
|
{
|
|
|
|
|
DestroyWindow(hWnd);
|
|
|
|
|
}
|
|
|
|
|
return TRUE;
|
|
|
|
|
case WM_DESTROY:
|
|
|
|
|
{
|
|
|
|
|
PostQuitMessage(0);
|
|
|
|
|
}
|
|
|
|
|
return TRUE;
|
|
|
|
|
case WM_COMMAND:
|
|
|
|
|
{
|
|
|
|
|
if (HIWORD(wParam) == EN_CHANGE)
|
|
|
|
|
{
|
|
|
|
|
GetWindowTextW((HWND)lParam, buffer, std::size(buffer));
|
|
|
|
|
try { vars.at(LOWORD(wParam) - IDC_EDIT1) = std::stoi(buffer); }
|
2019-06-09 08:10:44 -04:00
|
|
|
|
catch (...) {}
|
2019-06-07 02:24:28 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return FALSE;
|
|
|
|
|
}, 0), SW_SHOW);
|
|
|
|
|
|
|
|
|
|
std::thread([] { while (true) lstrlenW(L"こんにちは"); }).detach();
|
|
|
|
|
|
|
|
|
|
MSG msg;
|
|
|
|
|
while (GetMessageW(&msg, NULL, 0, 0) > 0)
|
|
|
|
|
{
|
|
|
|
|
TranslateMessage(&msg);
|
|
|
|
|
DispatchMessageW(&msg);
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|