]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mdi.cpp
Fixed tab removal bug, and empty text element
[wxWidgets.git] / src / msw / mdi.cpp
index 9c28b56f13d16769d72aebee56a17d78eed3ec0a..ad76a20f54d2e16b2a3d1691e06460ccdddd24fe 100644 (file)
@@ -138,6 +138,14 @@ END_EVENT_TABLE()
 // the children
 // ===========================================================================
 
+void wxMDIParentFrame::Init()
+{
+#if wxUSE_MENUS && wxUSE_ACCEL
+  // the default menu doesn't have any accelerators (even if we have it)
+  m_accelWindowMenu = NULL;
+#endif // wxUSE_MENUS && wxUSE_ACCEL
+}
+
 bool wxMDIParentFrame::Create(wxWindow *parent,
                               wxWindowID id,
                               const wxString& title,
@@ -162,11 +170,6 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
       m_windowMenu->Append(wxID_MDI_WINDOW_PREV, _("&Previous"));
   }
 
-#if wxUSE_MENUS && wxUSE_ACCEL
-  // the default menu doesn't have any accelerators (even if we have it)
-  m_accelWindowMenu = NULL;
-#endif // wxUSE_MENUS && wxUSE_ACCEL
-
   if (!parent)
     wxTopLevelWindows.Append(this);
 
@@ -186,7 +189,7 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
   msflags &= ~WS_VSCROLL;
   msflags &= ~WS_HSCROLL;
 
-  if ( !wxWindow::MSWCreate(wxApp::GetRegisteredClassName(_T("wxMDIFrame")),
+  if ( !wxWindow::MSWCreate(wxApp::GetRegisteredClassName(wxT("wxMDIFrame")),
                             title.wx_str(),
                             pos, size,
                             msflags,
@@ -495,7 +498,7 @@ void wxMDIParentFrame::Cascade()
 void wxMDIParentFrame::Tile(wxOrientation orient)
 {
     wxASSERT_MSG( orient == wxHORIZONTAL || orient == wxVERTICAL,
-                  _T("invalid orientation value") );
+                  wxT("invalid orientation value") );
 
     ::SendMessage(GetWinHwnd(GetClientWindow()), WM_MDITILE,
                   orient == wxHORIZONTAL ? MDITILE_HORIZONTAL
@@ -792,7 +795,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
   MDICREATESTRUCT mcs;
 
   wxString className =
-      wxApp::GetRegisteredClassName(_T("wxMDIChildFrame"), COLOR_WINDOW);
+      wxApp::GetRegisteredClassName(wxT("wxMDIChildFrame"), COLOR_WINDOW);
   if ( !(style & wxFULL_REPAINT_ON_RESIZE) )
       className += wxApp::GetNoRedrawClassSuffix();
 
@@ -846,7 +849,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
 
   if ( !m_hWnd )
   {
-      wxLogLastError(_T("WM_MDICREATE"));
+      wxLogLastError(wxT("WM_MDICREATE"));
       return false;
   }
 
@@ -1435,7 +1438,7 @@ void MDISetMenu(wxWindow *win, HMENU hmenuFrame, HMENU hmenuWindow)
             DWORD err = ::GetLastError();
             if ( err )
             {
-                wxLogApiError(_T("SendMessage(WM_MDISETMENU)"), err);
+                wxLogApiError(wxT("SendMessage(WM_MDISETMENU)"), err);
             }
         }
     }
@@ -1474,7 +1477,7 @@ void MDIInsertWindowMenu(wxWindow *win, WXHMENU hMenu, HMENU menuWin)
                 inserted = true;
                 ::InsertMenu(hmenu, i, MF_BYPOSITION | MF_POPUP | MF_STRING,
                              (UINT_PTR)menuWin,
-                             wxGetTranslation(WINDOW_MENU_LABEL).wx_str());
+                             wxString(wxGetTranslation(WINDOW_MENU_LABEL)).wx_str());
                 break;
             }
         }
@@ -1483,7 +1486,7 @@ void MDIInsertWindowMenu(wxWindow *win, WXHMENU hMenu, HMENU menuWin)
         {
             ::AppendMenu(hmenu, MF_POPUP,
                          (UINT_PTR)menuWin,
-                         wxGetTranslation(WINDOW_MENU_LABEL).wx_str());
+                         wxString(wxGetTranslation(WINDOW_MENU_LABEL)).wx_str());
         }
     }