Click here to Skip to main content
15,942,847 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am making a GUI in Visual C++ 6.0. Its a dialog based application.
On running the application,the whole dialog form is not visible..(i.e. whole form is not visible on my screen,some part is getting clipped.)
Can anyone please suggest how to resize a dialog form same as window size, so that whole form is visible on any system in which I run the application?

Thanks,
Timkee
Posted

1 solution

You could simply set the Border property to Resizing. You could also measure the screen width/height and resize the dialog accordingly if you detect that it wouldn't fit otherwise.

C
void GetPrimaryScreenSizeInPixels( SIZE& s)
{
// Start With Nothing
ZeroMemory( &s, sizeof(SIZE) );
// Get Width/Height
s.cx = (LONG)::GetSystemMetrics( SM_CXFULLSCREEN );
s.cy = (LONG)::GetSystemMetrics( SM_CYFULLSCREEN );
}


You could also add scrollbars if controls otherwise just won't fit. (http://support.microsoft.com/kb/262954[^])

Good luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900