To reproduce this, change the "printing" sample OnPrint() method body to the following:
Code: Select all
wxPrintDialogData printDialogData(* g_printData);
wxPrintDialog dialog(this, &printDialogData);
auto result = dialog.ShowModal();
if (result == wxID_OK)
wxMessageBox("wxID_OK");
else if (result == wxID_CANCEL)
wxMessageBox("wxID_CANCEL");
else
wxMessageBox("Something else.");
The wxWidgets version is 3.2.1.
Maybe I am missing something when initializing the dialog?