Re: WS_MAXIMIZEBOX and StatusBar
On Aug 12, 8:19 am, "Tom Serface" <tom.nos...@camaswood.com> wrote:
Have you tried modifying the style before calling the base class
PreCreateWindow() . It seems like that would be an easy thing to try.
I don't think the status bar has anything to do with the window style though
(although I don't know that for sure). The statusbar is usually created in
the OnCreate() function with the toolbar and other things. Did you do
something in that function to change it?
Tom
"RAN" <nijenh...@wish.nl> wrote in message
news:1186840780.235501.127980@g4g2000hsf.googlegroups.com...
Hi,
I want to disable the maximizebutton on an SDI app. like so :
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.style &= ~WS_MAXIMIZEBOX;
return TRUE;
}
But now the statusbar is gone also ? How do i disable the
maximizebutton but not the statusbar ?- Hide quoted text -
- Show quoted text -
I wanted to disable the maximize button which works fine by changing
the style in PreCreateWindow()
I have a standard SDI app and have not programmed any lines other than
the cs.style &= ~WS_MAXIMIZEBOX;
I only changed m_pMainWnd->ShowWindow(SW_SHOW) to m_pMainWnd-
ShowWindow(SW_SHOWMAXIMIZED);
If i do a SW_SHOWMAXIMIZED the statusbar disappeares! I didnt do
anything else to the app...