-
July 13th, 2000, 10:02 PM
#1
Initially maximize window
Hi,
I know how to maximize the main window i.e using W_SHOWMAXIMIZED
But how can I maximize the child window initially?
Thank you
-
July 14th, 2000, 07:41 PM
#2
Re: Initially maximize window
You can add the window style WS_MAXIMIZE to the child frame's pre-create window function, as follows:
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// Maximize the child window.
cs.style |= WS_MAXIMIZE | WS_VISIBLE;
return (CMDIChildWnd::PreCreateWindow(cs));
}
I hope this helps,
John G.
-
August 17th, 2020, 05:49 AM
#3
Re: Initially maximize window
I am trying the above method but still my window is not getting displayed in the maximised mode
-
August 17th, 2020, 10:50 AM
#4
Re: Initially maximize window
In your CChildFrame header:
Code:
protected:
virtual void ActivateFrame(int nCmdShow = -1);
implementation:
Code:
void CChildFrame::ActivateFrame(int nCmdShow)
{
// TODO: Add your specialized code here and/or call the base class
if (-1 == nCmdShow && NULL == GetNextWindow() && NULL == GetNextWindow(GW_HWNDPREV))
nCmdShow = SW_SHOWMAXIMIZED;
CMDIChildWnd::ActivateFrame(nCmdShow);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|