在网上找到了一个相应的资源,就是让对话框的控件,与对话框的大小的改变相对应的,也就是一个头文件,定义了一些宏,然后程序在相应的部分调用这些宏,来达到最后的功能。
下面是关于这个头文件的一些说明:
/*===================================================*\
| |
| EASY-SIZE Macros |
| |
| Copyright (c) 2001 - Marc Richarme |
| devix@devix.cjb.net |
| http://devix.cjb.net |
| |
| License: |
| |
| You may use this code in any commersial or non- |
| commersial application, and you may redistribute |
| this file (and even modify it if you wish) as |
| long as you keep this notice untouched in any |
| version you redistribute. |
| |
| Usage: |
| |
| - Insert 'DECLARE_EASYSIZE' somewhere in your |
| class declaration |
| - Insert an easysize map in the beginning of your |
| class implementation (see documentation) and |
| outside of any function. |
| - Insert 'INIT_EASYSIZE;' in your |
| OnInitDialog handler. |
| - Insert 'UPDATE_EASYSIZE' in your OnSize handler |
| - Optional: Insert 'EASYSIZE_MINSIZE(mx,my);' in |
| your OnSizing handler if you want to specify |
| a minimum size for your dialog |
| |
| Check http://devix.cjb.net for the |
| docs and new versions |
| |
\*===================================================*/
Usage里面就是使用的一些步骤与说明。相信大家的翻译能力,偷个懒,就不作翻译了。根据这里面的说明,然后下载下面的代码,对应的看看,应该没啥大的问题了
下载地址:http://www.codeproject.com/KB/dialog/easysize.aspx
下面是关于这个头文件的一些说明:
/*===================================================*\
| |
| EASY-SIZE Macros |
| |
| Copyright (c) 2001 - Marc Richarme |
| devix@devix.cjb.net |
| http://devix.cjb.net |
| |
| License: |
| |
| You may use this code in any commersial or non- |
| commersial application, and you may redistribute |
| this file (and even modify it if you wish) as |
| long as you keep this notice untouched in any |
| version you redistribute. |
| |
| Usage: |
| |
| - Insert 'DECLARE_EASYSIZE' somewhere in your |
| class declaration |
| - Insert an easysize map in the beginning of your |
| class implementation (see documentation) and |
| outside of any function. |
| - Insert 'INIT_EASYSIZE;' in your |
| OnInitDialog handler. |
| - Insert 'UPDATE_EASYSIZE' in your OnSize handler |
| - Optional: Insert 'EASYSIZE_MINSIZE(mx,my);' in |
| your OnSizing handler if you want to specify |
| a minimum size for your dialog |
| |
| Check http://devix.cjb.net for the |
| docs and new versions |
| |
\*===================================================*/
Usage里面就是使用的一些步骤与说明。相信大家的翻译能力,偷个懒,就不作翻译了。根据这里面的说明,然后下载下面的代码,对应的看看,应该没啥大的问题了
下载地址:http://www.codeproject.com/KB/dialog/easysize.aspx
本文介绍了如何利用EASY-SIZE头文件中的宏,轻松实现对话框控件与对话框大小变化的同步。通过在类声明、类实现、初始化和尺寸变化处理函数中调用特定宏,可以简化代码并提高应用的灵活性。此外,提供了详细的使用步骤和下载链接,方便开发者快速应用到实际项目中。
2252

被折叠的 条评论
为什么被折叠?



