]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fixes for wxUniv (moved wxDlgProc back to toplevel.cpp)
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 14 Jun 2002 22:26:32 +0000 (22:26 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 14 Jun 2002 22:26:32 +0000 (22:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dialog.cpp
src/msw/toplevel.cpp

index 170d28ddab88a288b74562c92ed9f538a9acd56e..f37849b3ee09e7ce847b57e59a05506a1225d894 100644 (file)
@@ -398,40 +398,6 @@ void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
 // dialog window proc
 // ---------------------------------------------------------------------------
 
-// the DialogProc for all wxWindows dialogs
-LONG APIENTRY _EXPORT
-wxDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
-    switch ( message )
-    {
-#if 0
-        case WM_ACTIVATE:
-        case WM_SHOWWINDOW:
-            // DefDlgProc() has a bug which makes it enter an infinite loop
-            // when a dialog containing a notebook whose children have
-            // WS_EX_CONTROLPARENT (automatically set for the windows with
-            // wxTAB_TRAVERSAL style as it's needed to get it right) is
-            // deactivated or hidden -- simply remove this code to see this
-            // happen in the notebook sample
-            //
-            // The only way I found to prevent this from happening is to never
-            // let it process these messages at all.
-            if ( !wParam )
-                return TRUE;
-#endif
-
-        case WM_INITDIALOG:
-            // for this message, returning TRUE tells system to set focus to
-            // the first control in the dialog box, but as we set the focus
-            // ourselves, we return FALSE from here as well, so fall through
-
-        default:
-            // for all the other ones, FALSE means that we didn't process the
-            // message
-            return FALSE;
-    }
-}
-
 long wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
 {
     long rc = 0;
index fd59bcdb2d2a4e93e83149460e3b6fc3cd541c92..d737b9a679ab429ee064256b8c53ceb6acdd0372 100644 (file)
@@ -61,7 +61,8 @@ static inline bool IsZoomed(HWND WXUNUSED(hwnd)) { return FALSE; }
 
 #endif // __WXMICROWIN__
 
-// this is defined in dialog.cpp
+// NB: wxDlgProc must be defined here and not in dialog.cpp because the latter
+//     is not included by wxUniv build which does need wxDlgProc
 LONG APIENTRY _EXPORT
 wxDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
 
@@ -783,3 +784,21 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event)
     }
 }
 
+// the DialogProc for all wxWindows dialogs
+LONG APIENTRY _EXPORT
+wxDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+    switch ( message )
+    {
+        case WM_INITDIALOG:
+            // for this message, returning TRUE tells system to set focus to
+            // the first control in the dialog box, but as we set the focus
+            // ourselves, we return FALSE from here as well, so fall through
+
+        default:
+            // for all the other ones, FALSE means that we didn't process the
+            // message
+            return FALSE;
+    }
+}
+