void MyFrame::OnNotifMsgAuto(wxCommandEvent& WXUNUSED(event))
{
+ // Notice that the notification remains shown even after the
+ // wxNotificationMessage object itself is destroyed so we can show simple
+ // notifications using temporary objects.
if ( !wxNotificationMessage
(
"Automatic Notification",
{
wxLogStatus("Failed to show notification message");
}
+
+ // But it doesn't have to be a temporary, of course.
+ wxNotificationMessage n("Dummy Warning", "Example of a warning notification.");
+ n.SetFlags(wxICON_ERROR);
+ n.Show(5); // Just for testing, use 5 second delay.
}
void MyFrame::OnNotifMsgShow(wxCommandEvent& WXUNUSED(event))
void TestMessageBoxDialog::OnApply(wxCommandEvent& WXUNUSED(event))
{
- wxMessageDialog dlg(this, GetMessage(), GetTitle(), GetStyle());
+ wxMessageDialog dlg(this, GetMessage(), GetBoxTitle(), GetStyle());
PrepareMessageDialog(dlg);
wxString btnName;
void TestRichMessageDialog::OnApply(wxCommandEvent& WXUNUSED(event))
{
- wxRichMessageDialog dlg(this, GetMessage(), GetTitle(), GetStyle());
+ wxRichMessageDialog dlg(this, GetMessage(), GetBoxTitle(), GetStyle());
PrepareMessageDialog(dlg);
dlg.ShowCheckBox(m_textCheckBox->GetValue(),