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/branches/WX_2_4_BRANCH@18294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -263,10 +263,10 @@ BOOL CTheApp::OnIdle(LONG lCount)
|
|||||||
|
|
||||||
bool MyApp::OnInit(void)
|
bool MyApp::OnInit(void)
|
||||||
{
|
{
|
||||||
// Don't exit app when the top level frame is deleted
|
// Exit app when the top level frame is deleted
|
||||||
// SetExitOnFrameDelete(FALSE);
|
SetExitOnFrameDelete(TRUE);
|
||||||
|
|
||||||
wxFrame* frame = CreateFrame();
|
(void) CreateFrame();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -33,6 +33,12 @@
|
|||||||
|
|
||||||
#include "wx/msw/private.h"
|
#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
|
// from src/msw/app.cpp
|
||||||
extern void WXDLLEXPORT wxEntryCleanup();
|
extern void WXDLLEXPORT wxEntryCleanup();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user