MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Show

Method Show

Source/Engine/Platform/Windows/WindowsPlatform.cpp:435–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433#endif
434
435DialogResult MessageBox::Show(Window* parent, const StringView& text, const StringView& caption, MessageBoxButtons buttons, MessageBoxIcon icon)
436{
437 // Construct input flags
438 UINT flags = 0;
439 switch (buttons)
440 {
441 case MessageBoxButtons::AbortRetryIgnore:
442 flags |= MB_ABORTRETRYIGNORE;
443 break;
444 case MessageBoxButtons::OK:
445 flags |= MB_OK;
446 break;
447 case MessageBoxButtons::OKCancel:
448 flags |= MB_OKCANCEL;
449 break;
450 case MessageBoxButtons::RetryCancel:
451 flags |= MB_RETRYCANCEL;
452 break;
453 case MessageBoxButtons::YesNo:
454 flags |= MB_YESNO;
455 break;
456 case MessageBoxButtons::YesNoCancel:
457 flags |= MB_YESNOCANCEL;
458 break;
459 default:
460 break;
461 }
462 switch (icon)
463 {
464 case MessageBoxIcon::Asterisk:
465 flags |= MB_ICONASTERISK;
466 break;
467 case MessageBoxIcon::Error:
468 flags |= MB_ICONERROR;
469 break;
470 case MessageBoxIcon::Exclamation:
471 flags |= MB_ICONEXCLAMATION;
472 break;
473 case MessageBoxIcon::Hand:
474 flags |= MB_ICONHAND;
475 break;
476 case MessageBoxIcon::Information:
477 case MessageBoxIcon::Question:
478 flags |= MB_ICONINFORMATION;
479 break;
480 //case MessageBoxIcon::Question:
481 // flags |= MB_ICONQUESTION;
482 // break;
483 case MessageBoxIcon::Stop:
484 flags |= MB_ICONSTOP;
485 break;
486 case MessageBoxIcon::Warning:
487 flags |= MB_ICONWARNING;
488 break;
489 default:
490 break;
491 }
492 flags |= MB_TASKMODAL;

Callers

nothing calls this directly

Calls 3

StringClass · 0.50
GetNativePtrMethod · 0.45
GetTextMethod · 0.45

Tested by

no test coverage detected