容器中的MFC ActiveX控件 [英] MFC ActiveX control in Container

查看:85
本文介绍了容器中的MFC ActiveX控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


当前,我们有一个MFC ActiveX控件.该控件放置在一个对话框(基于对话框的应用程序)中.每当对话框(容器)的大小调整时,我们也要调整ActiveX控件的大小.一种实现方法是在对话框中创建控件的成员变量,然后调用对话框的某些函数(例如:ActiveXControl-> MoveWindow(),...).但是,如果不对容器端进行任何修改(对话框),则可以在ActiveX控件中获得有关容器大小的任何通知/提示.

如果您需要任何其他输入,请与我联系.

提前谢谢您.

最好的问候,
Raghav

Hi,
Currently we are having one MFC ActiveX control. This control is placed in one Dialog (Dialog based application). Whenever the dialog (container) is getting resized, we want to adjust the size of the ActiveX control also. One way to do this is creating a member variable of control in dialog and call some functions of the dialog (ex: ActiveXControl->MoveWindow(),...). But without doing any modifications at the container side (dialog) can we get any notification/intimation about container size inside ActiveX control.

Please get back to me if you need any additional inputs on this.

Thank you in advance.

Best Regards,
Raghav

推荐答案

activex控件是第三方吗?
如果是这样,我认为只有可能的方法是MoveWindow()和SetWindowPos()
否则,您可以将methode添加到activex控件并处理其中的大小调整逻辑,然后从客户端对话框中调用此methode.
但如果有许多客户使用此方法,则不是一个好的逻辑.
Is the activex control is 3rd party one??
if so i think only possible ways are MoveWindow() and SetWindowPos()
otherwise you can add methode to the activex control and handle resizing logic in it and invoke this methode from your client dialog.
but not a good logic if many clients use this.


这篇关于容器中的MFC ActiveX控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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