如何在 MFC SDI CFormView 应用程序中调整表单(对话框)的大小? [英] How does one resize the form(dialog) in a MFC SDI CFormView application?

查看:67
本文介绍了如何在 MFC SDI CFormView 应用程序中调整表单(对话框)的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过了MoveWindow(50,50,150,200,TRUE) in CMyFormView::OnInitialUpdate();

另外,我在

CWinApp::InitInstance();
RECT desktop;

const HWND hDesktop = ::GetDesktopWindow();
::GetWindowRect(hDesktop,&desktop);

MoveWindow(hDesktop,0,0,900,400,TRUE);  

我无法调整表单(对话框)的大小.
我将不胜感激任何建议.

I am having no luck resizing the form(dialog).
I would appreciate any suggestions.

推荐答案

在 SDI 程序中,对话框的大小由主机窗口调整以填充客户区.调整框架窗口的大小,随后会出现对话框.把这个放在表单视图的 OnInitialUpdate

In an SDI program the dialog is sized by the mainframe window to fill the client area. Resize the frame window and the dialog will follow. Put this in the formview's OnInitialUpdate

AfxGetMainWnd()->MoveWindow(....);

这篇关于如何在 MFC SDI CFormView 应用程序中调整表单(对话框)的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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