3 回答

慕侠2389804
TA贡献1719条经验 获得超6个赞
你想在按下按钮以后,CTextView函数就去访问m_theta的值这很明显是一个事件,如果不通过发消息通知。你的CTextView函数怎么知道什么时候去访问m_theta的值呢?既然只有发消息,索性就把m_theta的值在消息中发过去不就好了吗?

慕田峪9158850
TA贡献1794条经验 获得超7个赞
有很多种方法可以 ,我介绍两种:
第一种:
CMainFrame *pFrameWnd = (CMainFrame*)AfxGetApp()->GetMainWnd;
pFrameWnd->GetActiveView();
第二种是利用全局变量the App,在CMyAPP这个类里有一个申明的全局变量。:
theApp.GetMainWnd()->GetActiveView();
添加回答
举报
0/150
提交
取消