X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..8add533eb22ba0756f5b426f77ee593bc1aa6fcd:/src/os2/msgdlg.cpp diff --git a/src/os2/msgdlg.cpp b/src/os2/msgdlg.cpp index 72cef2ae42..1c7e16b39b 100644 --- a/src/os2/msgdlg.cpp +++ b/src/os2/msgdlg.cpp @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: msgdlg.cpp +// Name: src/os2/msgdlg.cpp // Purpose: wxMessageDialog // Author: David Webster // Modified by: // Created: 10/10/99 -// RCS-ID: $$ +// RCS-ID: $Id$ // Copyright: (c) David Webster -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -23,11 +23,11 @@ #include "wx/dialog.h" #include "wx/app.h" #include "wx/msgdlg.h" +#include "wx/math.h" #endif #include "wx/os2/private.h" -#include #include #include @@ -46,8 +46,8 @@ wxMessageDialog::wxMessageDialog( { m_sCaption = rsCaption; m_sMessage = rsMessage; - m_lDialogStyle = lStyle; m_pParent = NULL; // pParent; + SetMessageDialogStyle(lStyle); } // end of wxMessageDialog::wxMessageDialog int wxMessageDialog::ShowModal() @@ -55,6 +55,7 @@ int wxMessageDialog::ShowModal() HWND hWnd = 0; ULONG ulStyle = MB_OK; int nAns = wxOK; + const long lStyle = GetMessageDialogStyle(); if (!wxTheApp->GetTopWindow()) { @@ -72,31 +73,31 @@ int wxMessageDialog::ShowModal() hWnd = (HWND) m_pParent->GetHWND(); else hWnd = HWND_DESKTOP; - if (m_lDialogStyle & wxYES_NO) + if (lStyle & wxYES_NO) { - if (m_lDialogStyle & wxCANCEL) + if (lStyle & wxCANCEL) ulStyle = MB_YESNOCANCEL; else ulStyle = MB_YESNO; - if (m_lDialogStyle & wxNO_DEFAULT) + if (lStyle & wxNO_DEFAULT) ulStyle |= MB_DEFBUTTON2; } - if (m_lDialogStyle & wxOK) + if (lStyle & wxOK) { - if (m_lDialogStyle & wxCANCEL) + if (lStyle & wxCANCEL) ulStyle = MB_OKCANCEL; else ulStyle = MB_OK; } - if (m_lDialogStyle & wxICON_EXCLAMATION) + if (lStyle & wxICON_EXCLAMATION) ulStyle |= MB_ICONEXCLAMATION; - else if (m_lDialogStyle & wxICON_HAND) + else if (lStyle & wxICON_HAND) ulStyle |= MB_ICONHAND; - else if (m_lDialogStyle & wxICON_INFORMATION) + else if (lStyle & wxICON_INFORMATION) ulStyle |= MB_ICONEXCLAMATION; - else if (m_lDialogStyle & wxICON_QUESTION) + else if (lStyle & wxICON_QUESTION) ulStyle |= MB_ICONQUESTION; if (hWnd != HWND_DESKTOP)