📄 subject_35660.htm
字号:
<p>
序号:35660 发表者:剑月明 发表日期:2003-04-08 15:44:45
<br>主题:对话框上有个控件,如何使它随对话框的大小变化而变化啊??
<br>内容: 这个控件占整个对话框
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:wowow 回复日期:2003-04-08 15:58:03
<br>内容:1.在对话框中用class wizard实现OnSize;<BR>2.假定你的控件句柄为*pWnd,对话框句柄为*pDlg;<BR>RECT rect;<BR>pDlg->getClientRect(&rect);<BR>int nWidth = rect.right - rcet.left;<BR>int nHeight = rect.bottom - rect.top;<BR>pWnd->SetWindowPos(NULL, rect.left, rect.top, nWidth, nHeight, SWP_SHOWWINDOW);
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:Anu 回复日期:2003-04-08 16:06:51
<br>内容:我也是在这发现的一个好东东,给你吧!<BR> Usage: |<BR>| |<BR>| - Insert 'DECLARE_EASYSIZE' somewhere in your |<BR>| class declaration |<BR>| - Insert an easysize map in the beginning of your |<BR>| class implementation (see documentation) and |<BR>| outside of any function. |<BR>| - Insert 'INIT_EASYSIZE;' in your |<BR>| OnInitDialog handler. |<BR>| - Insert 'UPDATE_EASYSIZE' in your OnSize handler |<BR>| - Optional: Insert 'EASYSIZE_MINSIZE(mx,my);' in |<BR>| your OnSizing handler if you want to specify |<BR>| a minimum size for your dialog |<BR>| <BR>这是在EasySize.h中的话,你要在stdafx.h文件中包含EasySize.h!<BR>有了这个东东,对话框里有几个控件,你想怎样缩放都可设置!!!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:剑月明 回复日期:2003-04-08 22:18:45
<br>内容:谢谢两位朋友的答复!!!<BR>感谢帮助!!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -