]> git.saurik.com Git - wxWidgets.git/commitdiff
MFC sample now works properly; WinMain not defined in wxMSW
authorJulian Smart <julian@anthemion.co.uk>
Tue, 17 Dec 2002 10:52:10 +0000 (10:52 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 17 Dec 2002 10:52:10 +0000 (10:52 +0000)
if wxUSE_MFC is defined.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/mfc/mfctest.cpp
src/msw/main.cpp

index 7121cc136c5326514b4bc7dccc5a69dac722b512..7615f0fac7a3d0240df8783fab8796af01593710 100644 (file)
@@ -264,7 +264,7 @@ BOOL CTheApp::OnIdle(LONG lCount)
 bool MyApp::OnInit(void)
 {
   // Don't exit app when the top level frame is deleted
-//  SetExitOnFrameDelete(FALSE);
+  SetExitOnFrameDelete(TRUE);
   
   wxFrame* frame = CreateFrame();
   return TRUE;
index 6803110d507b83db10d280311bbdacaef097275b..00736a1394dce0105eaadb95984c6e55762313c7 100644 (file)
 
 #include "wx/msw/private.h"
 
+// Don't implement WinMain if we're building an MFC/wxWindows
+// hybrid app.
+#if wxUSE_MFC && !defined(NOMAIN)
+#define NOMAIN 1
+#endif
+
 // from src/msw/app.cpp
 extern void WXDLLEXPORT wxEntryCleanup();