git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6601
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
if (wxTheApp->OnInit())
{
{
if (wxTheApp->OnInit())
{
+ nRetValue = wxTheApp->OnRun();
+// nRetValue = -1;
- if (nRetValue == 0)
- {
- wxWindow* pTopWindow = wxTheApp->GetTopWindow();
+ wxWindow* pTopWindow = wxTheApp->GetTopWindow();
+ if (pTopWindow)
+ {
+ // Forcibly delete the window.
+ if (pTopWindow->IsKindOf(CLASSINFO(wxFrame)) ||
+ pTopWindow->IsKindOf(CLASSINFO(wxDialog)) )
- // Forcibly delete the window.
- if (pTopWindow->IsKindOf(CLASSINFO(wxFrame)) ||
- pTopWindow->IsKindOf(CLASSINFO(wxDialog)) )
- {
- pTopWindow->Close(TRUE);
- wxTheApp->DeletePendingObjects();
- }
- else
- {
- delete pTopWindow;
- wxTheApp->SetTopWindow(NULL);
- }
+ pTopWindow->Close(TRUE);
+ wxTheApp->DeletePendingObjects();
+ }
+ else
+ {
+ delete pTopWindow;
+ wxTheApp->SetTopWindow(NULL);
+ //
+ // Send anything to initialize the frame
+ //
+ ::WinSendMsg( GetHwnd()
+ ,WM_UPDATEFRAME
+ ,(MPARAM)FCF_MENU
+ ,(MPARAM)0
+ );
hClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT);
::WinShowWindow(GetHwnd(), (BOOL)bShowCmd);
::WinShowWindow(hClient, (BOOL)bShowCmd);
hClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT);
::WinShowWindow(GetHwnd(), (BOOL)bShowCmd);
::WinShowWindow(hClient, (BOOL)bShowCmd);
,SWP_SIZE | SWP_MOVE
))
return FALSE;
,SWP_SIZE | SWP_MOVE
))
return FALSE;
+ WinQueryWindowPos(hClient, &vSwp);
return TRUE;
} // end of wxFrame::OS2Create
return TRUE;
} // end of wxFrame::OS2Create