新手问题:在基于dialog base型框架中,如何从外部获得MFC向导生成的CDialog实例的指针? 在框架的app部分有如下代码: CTestDlg dlg; m_pMainWnd = &dlg;想在自己写的MyClass.cpp中操作以上变量,请问如何实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 楼上这样不行的,有三种方法:CTestDlg *pdlg;1、pdlg=(CTestDlg *)AfxGetMainWnd()->GetSafeHwnd();2、pdlg=(CTestDlg *)AfxGetApp()->m_pMainWnd;3、pdlg=(CTestDlg *)AfxGetApp()->GetMainWnd(); 1、pdlg=(CTestDlg *)AfxGetMainWnd();2、pdlg=(CTestDlg *)AfxGetApp()->m_pMainWnd; ON_WM_SETFOCUS() ---------- OnSetFocus(CWnd *) Excel紧急求助 ACTIVE X int类型,数组类型 接口 ,急啊 多文档如何隐藏已建的文档? 如何让VC的编译器将*.pch(预编译头文件)自动重定向? 好像是fp参数? CEDIT 和 EDIT Box 离开几天 请问怎样才能在没有装vc的机器上正常运行使用了DBgrid的程序? 寻win xp ddk 求助使用GPRS MODENM的问题 求救 拆分窗口出错的问题
CTestDlg *pdlg;
1、pdlg=(CTestDlg *)AfxGetMainWnd()->GetSafeHwnd();
2、pdlg=(CTestDlg *)AfxGetApp()->m_pMainWnd;
3、pdlg=(CTestDlg *)AfxGetApp()->GetMainWnd();
2、pdlg=(CTestDlg *)AfxGetApp()->m_pMainWnd;