在SDI程序里的CFormView中怎么获取CMainFrame的句柄

在SDI程序里的CFormView中如何获取CMainFrame的句柄?在SDI程序里的CFormView中如何获取CMainFrame的句柄?[

在SDI程序里的CFormView中如何获取CMainFrame的句柄?
在SDI程序里的CFormView中如何获取CMainFrame的句柄? 


[解决办法]
Afxgetapp()->GetMainWnd()
强制类型转换即可
[解决办法]
使用全局函数 AfxGetMainWnd()
[解决办法]
这种情况下GetParent()也可以