1

I created a GUI in the wxFrame which is the main window. In the main window class, I have members which are a wxMiniFrame, and a wxPanel.

On the wxPanel there is a button, when I click the button a new wxMiniFrame will create and show, the parent of the wxMiniFrame is the wxFrame. When the mini frame is created, it always shows on the top. Even though I clicked on the main window, the mini frame is shown on the top.

However, if I change the wxMiniFrame' parent to the panel, the mini frame can work properly. It will go to the back when I click the main window.

Could anyone explain why this happen? Thank you.

user2753594
  • 145
  • 4
  • 15

1 Answers1

2

wxMiniFrame uses wxFRAME_FLOAT_ON_PARENT style when created with a non-NULL parent which is appropriate for palette-like windows, that mini frames are supposed to be used for. If you don't want it, you could create a regular wxFrame with wxFRAME_TOOL_WINDOW style.

VZ.
  • 21,740
  • 3
  • 39
  • 42