Click to See Complete Forum and Search --> : 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
Danielle Harvey
June 9th, 1999, 09:17 PM
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
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
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.