Search code examples
c++cwxwidgets

wxFrame is missing maximise button


I'm creating a wxFrame with the following call:

new wxFrame(NULL,wxID_ANY,wxEmptyString,wxDefaultPosition,wxDefaultSize,wxCAPTION|wxSTAY_ON_TOP|wxRESIZE_BORDER|wxMAXIMIZE_BOX|wxFRAME_NO_TASKBAR);

But although wxMAXIMIZE_BOX is set, there is no related button shown in the title bar of the frame. What am I doing wrong here?

Thanks!


Solution

  • You need to use wxSYSTEM_MENU for wxMAXIMIZE_BOX to have effect under MSW. Arguably, wx might add the former automatically if the latter is specified, just as it already does for wxCLOSE_BOX -- but currently it doesn't.