m_iconized = FALSE;
+ // the frame must have NULL parent HWND or it would be always on top of its
+ // parent which is not what we usually want (in fact, we only want it for
+ // frames with the special wxFRAME_FLOAT_ON_PARENT style)
+ if ( !(m_windowStyle & wxFRAME_FLOAT_ON_PARENT) )
+ {
+ parent = NULL;
+ }
+
wxTopLevelWindows.Append(this);
MSWCreate(m_windowId, parent, wxFrameClassName, this, title,
void wxFrameMSW::AttachMenuBar(wxMenuBar *menubar)
{
- m_frameMenuBar = menubar;
+ wxFrameBase::AttachMenuBar(menubar);
if ( !menubar )
{
{
m_hMenu = menubar->GetHMenu();
}
- else
+ else // no HMENU yet
{
- if ( menubar->IsAttached() )
- menubar->Detach();
-
m_hMenu = menubar->Create();
if ( !m_hMenu )
+ {
+ wxFAIL_MSG( _T("failed to create menu bar") );
return;
+ }
}
InternalSetMenuBar();