68 _In_ HINSTANCE hInstance,
69 [[maybe_unused]] _In_opt_ HINSTANCE hPrevInstance,
70 [[maybe_unused]] _In_ LPSTR lpCmdLine,
73 tt::crt_configure_process();
80 auto argv = CommandLineToArgvW(GetCommandLineW(), &argc);
87 for (
auto i = 0; i != argc; ++i) {
88 arguments.push_back(tt::make_cstr(tt::to_string(
std::wstring(argv[i]))));
94 arguments.insert(
std::next(
std::begin(arguments)), tt::make_cstr(
"--window-state=maximize"));
95 }
else if (nShowCmd == 0 || nShowCmd == 2 || nShowCmd == 6 || nShowCmd == 7 || nShowCmd == 11) {
96 arguments.insert(
std::next(
std::begin(arguments)), tt::make_cstr(
"--window-state=minimize"));
100 arguments.push_back(
nullptr);
104 [[maybe_unused]] ttlet time_zone = std::chrono::current_zone();
106 tt_log_error(
"Could not get current time zone: \"{}\"", e.
what());
114 tt::gui_system::instance = hInstance;
115 ttlet r =
tt_main(tt::narrow_cast<int>(arguments.size() - 1), arguments.data());
117 tt::shutdown_system();
119 for (
auto argument: arguments) {
int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nShowCmd)
Windows entry-point.
Definition crt.hpp:67