From a7fd7c7851405371db0171181f240591cca38158 Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Wed, 17 Jul 2002 23:36:53 +0000
Subject: [PATCH] wxSTAY_ON_TOP support in wxMessageBox (patch 581826)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/msgdlg.tex | 1 +
 src/msw/msgdlg.cpp       | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/docs/latex/wx/msgdlg.tex b/docs/latex/wx/msgdlg.tex
index 3caf92f46a..497758e37a 100644
--- a/docs/latex/wx/msgdlg.tex
+++ b/docs/latex/wx/msgdlg.tex
@@ -51,6 +51,7 @@ Constructor. Use \helpref{wxMessageDialog::ShowModal}{wxmessagedialogshowmodal}
 \twocolitem{{\bf wxICON\_ERROR}}{Shows an error icon - the same as wxICON\_HAND.}
 \twocolitem{{\bf wxICON\_QUESTION}}{Shows a question mark icon.}
 \twocolitem{{\bf wxICON\_INFORMATION}}{Shows an information (i) icon.}
+\twocolitem{{\bf wxSTAY\_ON\_TOP}}{The message box stays on top of all other window, even those of the other applications (Windows only).}
 \end{twocollist}
 }
 
diff --git a/src/msw/msgdlg.cpp b/src/msw/msgdlg.cpp
index ec05f72a37..834fbdb022 100644
--- a/src/msw/msgdlg.cpp
+++ b/src/msw/msgdlg.cpp
@@ -93,6 +93,9 @@ int wxMessageDialog::ShowModal()
     else if (m_dialogStyle & wxICON_QUESTION)
         msStyle |= MB_ICONQUESTION;
 
+    if ( m_dialogStyle & wxSTAY_ON_TOP )
+        msStyle |= MB_TOPMOST;
+
     if (hWnd)
         msStyle |= MB_APPLMODAL;
     else
-- 
2.50.0

