From 4cd513abbc64a09d2ec184fb428f65edad5cdc3a Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 17 Dec 2002 10:52:10 +0000 Subject: [PATCH] MFC sample now works properly; WinMain not defined in wxMSW 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 | 2 +- src/msw/main.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/samples/mfc/mfctest.cpp b/samples/mfc/mfctest.cpp index 7121cc136c..7615f0fac7 100644 --- a/samples/mfc/mfctest.cpp +++ b/samples/mfc/mfctest.cpp @@ -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; diff --git a/src/msw/main.cpp b/src/msw/main.cpp index 6803110d50..00736a1394 100644 --- a/src/msw/main.cpp +++ b/src/msw/main.cpp @@ -33,6 +33,12 @@ #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(); -- 2.50.0