Add yes/no buttons to message box

This commit is contained in:
FutureRave 2022-02-10 14:41:51 +00:00
parent 333e2eb024
commit 8290cadbe9
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955

View File

@ -102,15 +102,18 @@ namespace Components
}
else
{
errorStr = Utils::String::VA("Fatal error (0x%08X) at 0x%08X.", ExceptionInfo->ExceptionRecord->ExceptionCode, ExceptionInfo->ExceptionRecord->ExceptionAddress);
errorStr = Utils::String::VA("Fatal error (0x%08X) at 0x%08X.\n Copy exception address to keyboard?", ExceptionInfo->ExceptionRecord->ExceptionCode, ExceptionInfo->ExceptionRecord->ExceptionAddress);
}
//Exception::SuspendProcess();
// Message should be copied to the keyboard if no button is pressed
if (MessageBoxA(nullptr, errorStr.data(), nullptr, MB_YESNO | MB_ICONERROR) == IDYES)
{
Exception::CopyMessageToClipboard(Utils::String::VA("0x%08X", ExceptionInfo->ExceptionRecord->ExceptionAddress));
MessageBoxA(nullptr, errorStr.data(), "ERROR", MB_ICONERROR);
}
if ( Flags::HasFlag("bigminidumps"))
if (Flags::HasFlag("bigminidumps"))
{
Exception::SetMiniDumpType(true, false);
}