调整对话框大小 [英] Resizing Dialog Form

查看:116
本文介绍了调整对话框大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在Visual C ++ 6.0中制作GUI.它是一个基于对话框的应用程序.
在运行该应用程序时,整个对话框窗体不可见.(即,整个窗体在我的屏幕上不可见,某些部分被剪切了.)
任何人都可以建议如何调整与窗口大小相同的对话框形式的大小,以便在运行该应用程序的任何系统上都可以看到整个形式吗?

谢谢,
Timkee

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

推荐答案

您只需将Border属性设置为Resizing.您还可以测量屏幕的宽度/高度,并在检测到对话框不适合的情况下相应地调整对话框的大小.

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.

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 );
}



如果控件不适合,您还可以添加滚动条. ( http://support.microsoft.com/kb/262954 [



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

Good luck!


这篇关于调整对话框大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆