// ----------------------------------------------------------------------------
extern wxWindowList wxModelessWindows;
-extern wxList WXDLLEXPORT wxPendingDelete;
extern const wxChar *wxFrameClassName;
#if wxUSE_MENUS_NATIVE
wxTopLevelWindows.Append(this);
- MSWCreate(m_windowId, parent, wxFrameClassName, this, title,
+ // 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_TOOL_WINDOW style handled elsewhere)
+ MSWCreate(m_windowId, NULL, wxFrameClassName, this, title,
x, y, width, height, style);
wxModelessWindows.Append(this);