nielsew
asked on
Opening a MDI document Maximized
At application startup time how do I open a MDI document maximized? Currently I open the document and then maximize it, but it uses a graphics view so it flashes a bit. I would rather it was already maximized before any graphics are being displayed.
Thanks, Eric
Thanks, Eric
Add style WS_MAXIMIZE to the style of the createwindow function of the MDI client window.
ASKER
Do I have to use CreateWindow?
In CChildFrame::PreCreateWind ow I added
cs.style |= WS_MINIMIZE;
and it works as I would expect
If I use
cs.style |=WS_MAXIMIZE;
it seems to have no effect
BOOL CChildFrame::PreCreateWind ow(CREATES TRUCT& cs)
{
cs.style |= WS_MINIMIZE; // this works
return CMDIChildWnd::PreCreateWin dow(cs);
}
BOOL CChildFrame::PreCreateWind ow(CREATES TRUCT& cs)
{
cs.style |=WS_MAXIMIZE; // this doesn't work
return CMDIChildWnd::PreCreateWin dow(cs);
}
In CChildFrame::PreCreateWind
cs.style |= WS_MINIMIZE;
and it works as I would expect
If I use
cs.style |=WS_MAXIMIZE;
it seems to have no effect
BOOL CChildFrame::PreCreateWind
{
cs.style |= WS_MINIMIZE; // this works
return CMDIChildWnd::PreCreateWin
}
BOOL CChildFrame::PreCreateWind
{
cs.style |=WS_MAXIMIZE; // this doesn't work
return CMDIChildWnd::PreCreateWin
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you!