diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp
index ce71d5fc6d..9169487712 100644
--- a/src/html/htmprint.cpp
+++ b/src/html/htmprint.cpp
@@ -227,7 +227,7 @@ wxHtmlPrintout::CheckFit(const wxSize& pageArea, const wxSize& docArea) const
);
dlg.SetYesNoLabels(_("&Print"), _("&Cancel"));
- if ( dlg.ShowModal() != wxYES )
+ if ( dlg.ShowModal() != wxID_YES )
return false;
}