-
June 2nd, 2001, 07:11 AM
#1
Client Maximizing
I need to maximize my client window,
i used the ShowWindow function
inside the CWnd::OnCreate to maximize
the frame window, but still there is to maximize
the client one.
thanks
Sindrom11
-
June 2nd, 2001, 10:04 AM
#2
Re: Client Maximizing
Hi Sindrom11,
Try to find in your sources code like that:
m_pMainWnd->ShowWindow(SW_SHOW);
and replace line found with the next line
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
-
August 17th, 2020, 05:46 AM
#3
Re: Client Maximizing
Even I have the mainframe window maximizing issue.
My mainframe window not opening in fully MAXIMIZED mode when I run my application
( Note: It is a single child mainframe application ).
I am calling this below line of code in my OnCreate function
Code:
this->ShowWindow(SW_SHOWMAXIMIZED);
but still the window opens in less width and height and it is not occupying the entire screen.
Any changes to be done in the code?
-
August 17th, 2020, 02:30 PM
#4
Re: Client Maximizing
Originally Posted by vcdebugger
Even I have the mainframe window maximizing issue.
My mainframe window not opening in fully MAXIMIZED mode when I run my application
( Note: It is a single child mainframe application ).
I am calling this below line of code in my OnCreate function
Code:
this->ShowWindow(SW_SHOWMAXIMIZED);
but still the window opens in less width and height and it is not occupying the entire screen.
Any changes to be done in the code?
Have a look at your app class InitInstance method. Somewhere near the end of this method should be the lines like
Code:
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
Replace the
Code:
m_pMainWnd->ShowWindow(SW_SHOW);
with
Code:
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
Victor Nijegorodov
-
August 18th, 2020, 06:34 AM
#5
Re: Client Maximizing
Thanks. Its working now.
I want my window size to be fixed and dont want to allow user to resized by streching the window frame. Any idea how to do it...
Last edited by vcdebugger; August 18th, 2020 at 06:47 AM.
-
August 18th, 2020, 07:42 AM
#6
Re: Client Maximizing
Originally Posted by vcdebugger
Thanks. Its working now.
I want my window size to be fixed and dont want to allow user to resized by streching the window frame. Any idea how to do it...
Code:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style &= ~WS_THICKFRAME;
cs.style &= ~WS_MAXIMIZEBOX;
return CFrameWnd::PreCreateWindow(cs);
}
-
August 18th, 2020, 01:07 PM
#7
Re: Client Maximizing
Victor Nijegorodov
-
August 18th, 2020, 11:30 PM
#8
Re: Client Maximizing
Originally Posted by GCDEF
Code:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style &= ~WS_THICKFRAME;
cs.style &= ~WS_MAXIMIZEBOX;
return CFrameWnd::PreCreateWindow(cs);
}
Thanks a lot .. This is working perfect!
-
August 18th, 2020, 11:32 PM
#9
Re: Client Maximizing
Originally Posted by VictorN
Thanks. The solution mentioned in other post ( handling in precreateWindow() function ) worked so did not try this.
Will keep this in mind incase if required in future will use it.
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
|