/** * @file core/system_win.cpp * @brief Windows implementations of rex/system.h platform helpers. * * @copyright Copyright (c) 2026 Tom Clay * @license BSD 3-Clause License */ #ifndef NOMINMAX #define NOMINMAX #endif #include #include #include namespace rex { void ShowSimpleMessageBox(SimpleMessageBoxType type, std::string_view message) { UINT flags = MB_OK | MB_TOPMOST | MB_SETFOREGROUND; const wchar_t* title = L"ReXGlue"; switch (type) { case SimpleMessageBoxType::Help: flags |= MB_ICONINFORMATION; break; case SimpleMessageBoxType::Warning: flags |= MB_ICONWARNING; break; case SimpleMessageBoxType::Error: flags |= MB_ICONERROR; break; } auto wide = rex::string::to_utf16(message); ::MessageBoxW(nullptr, reinterpret_cast(wide.c_str()), title, flags); } } // namespace rex