-
July 18th, 2000, 10:31 AM
#1
How to maximize window ?
Hello there!
I need to maximize the main window of SDI program. I used PreCreateWindow function:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style|=WS_MAXIMIZE;
return CFrameWnd::PreCreateWindow(cs);
}
but nothing happend. What's wrong ?
-
July 18th, 2000, 01:54 PM
#2
Re: How to maximize window ?
One way to do it is by using your InitInstance() function of your application class, as follows:
BOOL CMyAp::InitInstance()
{
...
// Maximize the window. m_nCmdShow and m_pMainWnd are provided for
// you by MFC. Just put these lines at the bottom of InitInstance().
m_nCmdShow = SW_MAXIMIZE;
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
I hope this helps,
John G.
-
August 17th, 2020, 06:15 AM
#3
Re: How to maximize window ?
Thanks a lot this one is working
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
|