|
-
June 9th, 1999, 03:49 PM
#1
How to Custamize SDI application View???/
Hi
I have an SDI application. I want to fix the dimensions of the mainframe window to a perticular size.How do i do that?
Thanx
-
June 9th, 1999, 09:17 PM
#2
Re: How to Custamize SDI application View???/
This is actually quite easy. Open your application's mainfrm.cp file and place a series of statements similiar to this in your program's OnCreate member function:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCr...)
{
wpl.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(&wpl);
wpl.rcNormalPosition.top = 0;
wpl.rcNormalPosition.left = 0;
wpl.rcNormalPosition.right = 100;
wpl.rcNormalPosition.bottom = 250;
SetWindowPlacement(&wpl);
ShowWindow(SW_SHOWNORMAL);
...
Also, add the following line to the public section of mainfrm.h file:
WINDOWPLACEMENT wpl;
Recompile and execute. You can change the size and the position of the window.
-
June 10th, 1999, 08:06 AM
#3
Re: How to Custamize SDI application View???/
Hi,
Thanx for the solution and I could do that.But I want avoid resizing the window by user using mouse( What I mean is user should not be able to resize the window). How do I do that?
Thanx
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
|