如何使用MFC在2个组合框之间进行链接 [英] How to Link between 2 Combo Box's using MFC

查看:106
本文介绍了如何使用MFC在2个组合框之间进行链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的技术人员,

我是MFC的新手,对组合框也有类似要求.

1.目标是:从"X"组合框中选择的项目,然后其对应的项目必须放在"Y"组合框中.

(假设"X"内部有一些a,b,c,d.)如果删除了"X"组合框并选择了"a",则"a"下的项应为反映为"Y",希望您已经了解了目标.

2.另一个是使用>>"和<<"按钮(即从右到左,反之亦然)将项目从一个组合框转移到另一个列表框. />
请指导我完成此任务.

问候,

MFC Techie.

Dear Techies,

I am a newbie to MFC,and I''ve have similar kind of requirement related to Combo box.

1.The Objective is : The selected item(s) from ''X'' Combo Box, then its corresponding Items must get on the ''Y'' Combo Box.

(Assume that ''X'' has internally some a,b,c,d..)if ''X'' Combo box is dropped and ''a'' is selected , the items under ''a'' should be reflected to ''Y'',I hope you''ve understood the objective.

2. And another one is from Transfering Items from One Combo Box to other List Box using the ''>>'' and ''<<'' buttons(ie from Right to Left and vice versa).

Pls guide me to accomplish this.

Regards,

MFC Techie.

推荐答案

好吧,MFC中的大多数控件都是CWnd派生的,这意味着如果它们之间有SendMessage()PostMessage(),则可以在它们之间进行选择别人的把柄.另外,如果您有父母CDialog,他可以充当中间人,并从/从控件接收/彼此的消息.
Well, most controls in MFC are CWnd derived, that means that you can SendMessage() or PostMessage() between them if they have one another''s handles. Alternatively, if you have a parent CDialog, he can act as the middle man and receive/each other''s messages to/from controls.


这篇关于如何使用MFC在2个组合框之间进行链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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