问题
I'm writing app in wxWidgets C++ version (using linux but I want to cross-compile to win) for my friend who plays RPG games.Quite simple app - 8 buttons imitating dices with diffrent sizes, and one static text showing the result of the randomizing. I've made the Window "static" - it is impossible to maximize it or ... generally change the size of the main window. So, I want to make the icon "maximize" hidden or deleted. I've been searching. However, I haven't found the solution. I've only disabled the button using
MainFrame::MainFrame(const wxString &title): wxFrame (
NULL, wxID_ANY, title, wxDefaultPosition, wxSize(290,180),
wxDEFAULT_FRAME_STYLE & ~(wxRESIZE_BORDER | wxMAXIMIZE_BOX))
So, it it possible to make the icon "hidden" or "deleted" ?
回答1:
It seems that you can either have none of the buttons (including the close button) like this:-
style = wxCAPTION;
MainFrame::MainFrame(const wxString &title): wxFrame (NULL, wxID_ANY, title, wxDefaultPosition, wxSize(290,180), style)
or you get all 3 buttons but with some disabled:-
style = wxCAPTION | wxSYSTEM_MENU | wxMINIMIZE_BOX;
MainFrame::MainFrame(const wxString &title): wxFrame (NULL, wxID_ANY, title, wxDefaultPosition, wxSize(290,180), style)
来源:https://stackoverflow.com/questions/25179460/is-it-possible-to-hide-delete-maximize-button-in-wxwidgets-c