2013年7月31日
摘要: 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、获取工具栏、状态栏指针 主框架中可以直接使用m_wn. 阅读全文
posted @ 2013-07-31 09:20 胡小颖颖 阅读(279) 评论(0) 推荐(0) 编辑