摘要:
引用柚子 的 MFC中获取各种类指针1、获取应用程序指针 CMyApp* pApp=(CMyApp*)AfxGetApp();2、获取主框架指针 CWinApp 中的公有成员变量 m_pMainWnd 就是主框架的指针 CMainFrame* pMainFrame = (CMainFrame*)(AfxGetApp()->m_pMainWnd); 或者 CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();3、获取菜单指针 CMenu* pMenu = AfxGetMainWnd()->GetMenu();4、获取工具栏、状态栏 阅读全文
posted @ 2011-05-15 21:54
kangwang1988
阅读(2474)
评论(1)
推荐(0)
浙公网安备 33010602011771号