MFC doc类,view类,frame类之间互相调用 作者:Fansy2000 (顶顶)



MFC doc类,view类,frame类之间互相调用
 


访问应用程序的其它类   
    
 获得CWinApp:  
  -在CMainFrame,CChildFrame,CDocument,CView中直接调用AfxGetApp()或用theApp  
  -在其它类中只能用AfxGetApp()  
   
  获得CMainFrame:  
  -在CMinApp中用AfxGetMainWnd()或者m_pMainWnd  
  -在CChildFrame中可用GetParentFrame()  
  -在其它类中用AfxGetMainWnd()  
   
  获得CChildFrame:  
  -在CView中用GetParentFrame()  
  -在CMainFrame中用MDIGetActive()或GetActiveFrame()  
  -在其它类中用AfxGetMainWnd()->MDIGetActive()或AfxGetMainWnd()->GetActiveFrame()  
   
  获得CDocument:  
  -在CView中用GetDocument()  
  -在CChildFrame中用GetActiveView()->GetDocument()  
  -在CMainFrame中用  
  -if   SDI:GetActiveView()->GetDocument()  
  -if   MDI:MDIGetActive()->GetActiveView()->GetDocument()  
  -在其它类中  
  -if   SDI:AfxGetMainWnd()->GetActiveView()->GetDocument()  
  -if   MDI:AfxGetMainWnd()->MDIGetActive()->GetActiveView()->GetDocument()  
   
  获得CView:  
  -在CDocument中   POSITION   pos   =   GetFirstViewPosition();GetNextView(pos)  
  -在CChildFrame中   GetActiveView()  
  -在CMainFrame中  
  -if   SDI:GetActiveView()  
  -if   MDI:MDIGetActive()->GetActiveView()  
  -在其它类中  
  -if   SDI:AfxGetMainWnd()->GetActiveView()  
  -if   MDI:AfxGetMainWnd()->MDIGetActive()->GetActiveView
() 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在Matlab中,空值可以使用空矩阵来表示。空矩阵是指没有元素的矩阵,可以用来表示没有数据的情况。可以使用isempty函数来判断矩阵是否为空矩阵。如果矩阵为空,则返回1,否则返回0。例如,对于一个非空矩阵matrix,运行代码returnValue = isempty(matrix)会返回0。如果将矩阵matrix设置为空矩阵,运行相同的代码会返回1。 此外,你还可以使用isreal函数来判断矩阵中单个数值是否为实数。如果数值是实数,则返回1,否则返回0。例如,运行代码returnValue = isreal(matrix(2,2))会返回1,表示matrix(2,2)是一个实数。而运行代码returnValue = isreal(matrix(2,3))会返回0,表示matrix(2,3)不是一个实数。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [matlab 空值预处理](https://download.csdn.net/download/fansy_2011/4091092)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [MATLAB常用技巧之复数判断,矩阵中空值判断,空矩阵判断](https://blog.csdn.net/LL20246033/article/details/108555133)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值