Nested Dialogs 嵌套对话框

本文介绍如何使用Win32 API实现嵌套对话框,即在一个对话框内嵌入另一个对话框,使之看起来像是单一的整体。文章详细说明了创建嵌套对话框所需步骤,包括设置模板、参数及消息循环的挂钩等,并提到了使用MFC可以简化这一过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

The Windows Common Dialogs

Nested Dialogs

Win32 provides a way to "nest" one dialog inside another so that multiple dialogs appear as one seamless whole. You must first create a dialog resource template with a "hole" in it—typically a group box control—with the specific child window ID stc32 (=0x045f) . Your program sets some parameters that tell COMDLG32 to use your template. In addition, your program must hook into the COMDLG32 message loop so that it gets first crack at selected notifications. When you're done with all of this, you'll notice that you have created a dialog window that is a child of the COMDLG32 dialog window, even though your template wraps COMDLG32's template.

This sounds difficult, and it is unless you use MFC. With MFC, you build the dialog resource template as described above, derive a class from one of the common dialog base classes, add the class-specific connection code in OnInitDialog , and then happily use ClassWizard to map the messages that originate from your template's new controls.

 

 

Please refer to Programming Microsoft Visual C++ Fifth Edition

 

 

再看看这里差不多了。

 

http://topic.youkuaiyun.com/u/20090601/15/ff762d3e-beef-477b-9184-a088cd42d73f.html

http://hi.baidu.com/%B7%C7%D1%CC%B7%C9%CE%ED/blog/item/1fdfd6ca890c4c44f21fe792.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值