// Author: David Webster
// Modified by:
// Created: 10/10/99
-// RCS-ID: $Id$
// Copyright: (c) David Webster
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/math.h"
#endif
+#include "wx/modalhook.h"
#include "wx/os2/private.h"
#include <stdlib.h>
int wxMessageDialog::ShowModal()
{
+ WX_HOOK_MODAL_DIALOG();
+
HWND hWnd = 0;
ULONG ulStyle = MB_OK;
int nAns = wxOK;
else
ulStyle = MB_OK;
}
- if (lStyle & wxICON_EXCLAMATION)
- ulStyle |= MB_ICONEXCLAMATION;
- else if (lStyle & wxICON_HAND)
- ulStyle |= MB_ICONHAND;
- else if (lStyle & wxICON_INFORMATION)
- ulStyle |= MB_ICONEXCLAMATION;
- else if (lStyle & wxICON_QUESTION)
- ulStyle |= MB_ICONQUESTION;
+
+ switch ( GetEffectiveIcon() )
+ {
+ case wxICON_ERROR:
+ ulStyle |= MB_ERROR;
+ break;
+
+ case wxICON_WARNING:
+ ulStyle |= MB_WARNING;
+ break;
+
+ case wxICON_QUESTION:
+ ulStyle |= MB_QUERY;
+ break;
+
+ case wxICON_INFORMATION:
+ ulStyle |= MB_INFORMATION;
+ break;
+ }
if (hWnd != HWND_DESKTOP)
ulStyle |= MB_APPLMODAL;