-void wxFrame::PositionStatusBar(void)
-{
- // native status bar positions itself
- if (m_frameStatusBar
-#if USE_NATIVE_STATUSBAR
- && !m_frameStatusBar->IsKindOf(CLASSINFO(wxStatusBar95))
-#endif
- )
- {
- int w, h;
- GetClientSize(&w, &h);
- int sw, sh;
- m_frameStatusBar->GetSize(&sw, &sh);
- m_frameStatusBar->SetSize(0, h, w, sh);
- }
-}
-
-void wxFrame::SetMenuBar(wxMenuBar *menu_bar)
-{
- if (!menu_bar)
- {
- m_frameMenuBar = NULL;
- return;
- }
-
- if (menu_bar->m_menuBarFrame)
- return;
-
- int i;
- HMENU menu = CreateMenu();
-
- for (i = 0; i < menu_bar->m_menuCount; i ++)
- {
- HMENU popup = (HMENU)menu_bar->m_menus[i]->m_hMenu;
- //
- // After looking Bounds Checker result, it seems that all
- // menus must be individually destroyed. So, don't reset m_hMenu,
- // to allow ~wxMenu to do the job.
- //
- menu_bar->m_menus[i]->m_savehMenu = (WXHMENU) popup;
- // Uncommenting for the moment... JACS
- menu_bar->m_menus[i]->m_hMenu = 0;
- AppendMenu(menu, MF_POPUP | MF_STRING, (UINT)popup, menu_bar->m_titles[i]);
- }
-
- menu_bar->m_hMenu = (WXHMENU)menu;
- if (m_frameMenuBar)
- delete m_frameMenuBar;
-
- this->m_hMenu = (WXHMENU) menu;
-
- DWORD err = 0;
- if (!SetMenu((HWND) GetHWND(), menu))
- {
-#ifdef __WIN32__
- err = GetLastError();
-#endif
- }
-
- m_frameMenuBar = menu_bar;
- menu_bar->m_menuBarFrame = this;
-}