[英]Relationship between CDocument and CPropertySheet
I have a CPropertySheet
instance which is initialized using DoModal()
in one of the methods of my CDocument
class, in an MDI MFC application 我有一个
CPropertySheet
实例,该实例在MDI MFC应用程序的CDocument
类的方法之一中使用DoModal()
进行了初始化。
My problem is I would like to refresh the view associated with the document from the sheet without ending the DoModal()
. 我的问题是我想在不结束
DoModal()
情况下刷新工作表中与文档关联的视图。
How do I get an handle back to the CDocument
from my CPropertySheet
so I can manipulated the CView
easily ? 我如何从
CPropertySheet
获取到CDocument
的句柄,以便可以轻松地操纵CView
?
I have tried different things from this MSDN article but I am not able to retrieve what I want http://msdn.microsoft.com/en-us/library/bs315d2c.aspx 我已经尝试过与此MSDN文章进行不同的尝试,但是我无法检索我想要的内容http://msdn.microsoft.com/zh-cn/library/bs315d2c.aspx
Thanks a lot. 非常感谢。
You can use the SendMessage or PostMessage to the target window. 您可以使用SendMessage或PostMessage到目标窗口。 Do this when the apply button is clicked.
单击“应用”按钮时,请执行此操作。
Refer: http://cppandmfc.blogspot.com/2012/08/mfc-creating-and-using-property-page.html 请参阅: http : //cppandmfc.blogspot.com/2012/08/mfc-creating-and-using-property-page.html
You will get a Nice idea from that writeup 您将从该文章中得到一个不错的主意
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.