Base for wxMessageDialog with common checks for style.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-03-11 15:34:42 +00:00
parent 2cdd63c6b1
commit e5b5075810
19 changed files with 236 additions and 223 deletions

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: msgdlgg.cpp
// Name: src/generic/msgdlgg.cpp
// Purpose: wxGenericMessageDialog
// Author: Julian Smart, Robert Roebling
// Modified by:
@@ -65,7 +65,7 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent,
const wxPoint& pos)
: wxDialog( parent, wxID_ANY, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE )
{
m_dialogStyle = style;
SetMessageDialogStyle(style);
bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
@@ -151,7 +151,8 @@ void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
{
// Allow cancellation via ESC/Close button except if
// only YES and NO are specified.
if ( (m_dialogStyle & wxYES_NO) != wxYES_NO || (m_dialogStyle & wxCANCEL) )
const long style = GetMessageDialogStyle();
if ( (style & wxYES_NO) != wxYES_NO || (style & wxCANCEL) )
{
EndModal( wxID_CANCEL );
}