this is probably an easy thing, but i don't get it.. using wxDEFAULT_FRAME_STYLE &(wxRESIZE_BORDER | wxRESIZE_BOX | wxMAXIMIZE_BOX) doesn't work either. so is there a way just to show the x-button in the title bar of a frame?
i'm on winxp, using wx2.4.2..
thx in advance.
Hiding minimize/maximize buttons in a frame's title bar?
You are not supposed to use the flags like that. There should only be '|'s separating the flags, no '('s, ')'s or '&'s.
Reason:
Each flag (ex: wxMAXIMIZE_BOX) has only one bit set. Like 0010. Another flag might be 0001. The '|'-symol is a bitwise or operator. That means the result of 0100|0001 is 0101. This way one can easily set several bits in a single function call.
Reason:
Each flag (ex: wxMAXIMIZE_BOX) has only one bit set. Like 0010. Another flag might be 0001. The '|'-symol is a bitwise or operator. That means the result of 0100|0001 is 0101. This way one can easily set several bits in a single function call.
-
- Filthy Rich wx Solver
- Posts: 203
- Joined: Tue Aug 31, 2004 7:06 pm
- Location: Behind a can of Mountain Dew
- Contact:
You can just use all the flags you do want that make up wxDEFAULT_FRAME_STYLE (e.g. "wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN") or you can use AND the ONE'S COMPLIMENT to remove them from the style (e.g. "wxDEFAULT_FRAME_STYLE & (~wxMINIMIZE_BOX) & (~wxMAXIMIZE_BOX)").