add tests
This commit is contained in:
parent
958ce10327
commit
d4d6c6c8b6
@ -34,3 +34,4 @@ add_subdirectory(GUI)
|
||||
add_subdirectory(GUI/host)
|
||||
add_subdirectory(texthook)
|
||||
add_subdirectory(extensions)
|
||||
add_subdirectory(testractor)
|
||||
|
1
testractor/CMakeLists.txt
Normal file
1
testractor/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
||||
add_executable(Testractor WIN32 testractor.cpp testractor.rc)
|
27
testractor/resource.h
Normal file
27
testractor/resource.h
Normal file
@ -0,0 +1,27 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by testractor.rc
|
||||
//
|
||||
#define IDD_DIALOG1 101
|
||||
#define IDC_EDIT1 1000
|
||||
#define IDC_EDIT2 1001
|
||||
#define IDC_EDIT3 1002
|
||||
#define IDC_EDIT4 1003
|
||||
#define IDC_EDIT5 1004
|
||||
#define IDC_EDIT6 1005
|
||||
#define IDC_EDIT7 1006
|
||||
#define IDC_EDIT8 1007
|
||||
#define IDC_EDIT9 1008
|
||||
#define IDC_EDIT10 1009
|
||||
#define IDC_STATIC -1
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 103
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1011
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
46
testractor/testractor.cpp
Normal file
46
testractor/testractor.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
#include "common.h"
|
||||
#include "resource.h"
|
||||
|
||||
wchar_t buffer[1000] = {};
|
||||
std::array<int, 10> vars = {};
|
||||
|
||||
int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE, _In_ LPWSTR, _In_ int)
|
||||
{
|
||||
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); }
|
||||
catch (std::invalid_argument&) {}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
BIN
testractor/testractor.rc
Normal file
BIN
testractor/testractor.rc
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user