I need to disable maximize for my wxWidgets program. What code should I add to my frame in order to do this?
Asked
Active
Viewed 1,330 times
1
-
possible duplicate of [Is it possible to hide/delete maximize button in wxWidgets C++?](http://stackoverflow.com/questions/25179460/is-it-possible-to-hide-delete-maximize-button-in-wxwidgets-c) – Lion King Oct 11 '14 at 13:48
1 Answers
0
Derived your class like following :
TestFrame::TestFrame(wxWindow* parent)
: wxFrame(parent, wxID_ANY, main_frame_title_str, wxDefaultPosition, wxDefaultSize, wxSYSTEM_MENU | wxRESIZE_BORDER | wxMINIMIZE_BOX | wxCLOSE_BOX | wxCAPTION | wxCLIP_CHILDREN)
Then you disable maximize.
-
9It is better to use `wxDEFAULT_FRAME_STYLE & ~wxMAXIMIZE_BOX` as it is more correct and more clear. – VZ. Oct 11 '14 at 15:29
-
-
This unfortunately does not work for me. The windows still opens on mac OS with the enabled maximize button :/ – trinity420 May 30 '20 at 22:54
-
Not perfect on Windows: it can still be minimized by double-clicking on the title bar. – Crouching Kitten Jan 02 '22 at 15:52