Skip to content

ui::MessageBoxHost

Header: winui/ui/MessageBox.hpp.

What shows the message boxes ui::message_box() asks for.

There is one for the whole process: the platform's, or a double a test installs with ui::testing::set_message_box_host(). App code calls ui::message_box() and never needs the class. It is public so a test double can derive from it.

~MessageBoxHost

virtual ~MessageBoxHost() = default

show

virtual MessageBoxResult show(const Window* owner, const MessageBoxOptions& options) = 0

Shows options over owner (nullptr: no owner) and returns the user's answer.