RT,如何判断文件已经打开,不需要再重新打开,并将打开的文件置顶呢?谢谢!
解决方案 »
- 请问有没有支持png格式的ToolBar类
- 关于XML换行的问题
- getchar()
- 怎么样才能使我的exe文件在windows界面里显示我自己的图标
- 为什么CPaintDC 在绘制时,可以自己刷跟dialog背景颜色一样的背景色,而用CDC确不行呢
- 画中画问题(急)
- 组件注册问题!! 谢谢!!
- 出错:syntax error : expecting a type specification near "GetAllUser"?
- 我想请教一下关于hook截获api
- 能不能告诉我DLL文件的反编译器在那有吗,高分相送~~~~~~~~~~~~~~~急急急啊~
- 快一个月没来了散个分混个脸熟
- 用CreateService创建的服务,如何指定Description字符串?
if(pFrame)
{
pFrame->ShowWindow(SW_SHOWMAXIMIZED);
}
CMainFrame* pMainFrame = ((CMainFrame*)AfxGetMainWnd());
CMDIChildWnd* pFirstFrame = pMainFrame->MDIGetActive();
CMDIChildWnd* pFrame = pMainFrame->MDIGetActive();
do
{
CString str;
pFrame->GetWindowText(str);
AfxMessageBox(str); pMainFrame->MDINext();
pFrame = pMainFrame->MDIGetActive();
}while(pFirstFrame != pFrame);
CMainFrame* pMainFrame = ((CMainFrame*)AfxGetMainWnd());
CMDIChildWnd* pFrame = pMainFrame->MDIGetActive();
while(NULL != pFrame);
{
CString str;
pFrame->GetWindowText(str);
AfxMessageBox(str); pMainFrame->MDINext();
pFrame = pMainFrame->MDIGetActive();
}
pFrame 是空怎么也进循环呢
CMDIChildWnd* pFirstFrame = pMainFrame->MDIGetActive();
CMDIChildWnd* pFrame = pFirstFrame;
if(pFrame)
{
do
{
CString str;
pFrame->GetWindowText(str);
AfxMessageBox(str);
pMainFrame->MDINext();
pFrame = pMainFrame->MDIGetActive();
}while(pFirstFrame != pFrame);
}
非常感谢 但我有两个问题
1. 为什么while判断不出来NULL呢?
2. 为什么我用这样的代码不能设置断点呢?把红色的去掉就可以设置 CMainFrame* pMainWnd = (CMainFrame*) AfxGetMainWnd();
CMDIChildWnd* pMDIChild = pMainWnd->MDIGetActive(); //得到当前的子窗口
CMDIChildWnd* pMDIChildFirst = pMainWnd->MDIGetActive(); //得到当前的子窗口
while (NULL != pMDIChild)
{
CString strTitle = _T("");
pMDIChild->GetWindowText(strTitle);
if (strFilePath == strTitle)
{
return;
}
pMainWnd->MDINext();
pMDIChild = pMainWnd->MDIGetActive();
if (pMDIChildFirst == pMDIChild)
{
break;
}
}
CMDIChildWnd* pMDIChild = pMainWnd->MDIGetActive(); //得到当前的子窗口
CMDIChildWnd* pMDIChildFirst = pMainWnd->MDIGetActive(); //得到当前的子窗口
while (NULL != pMDIChild)
{
CString strTitle = _T("");
pMDIChild->GetWindowText(strTitle);
if (strFilePath == strTitle)
{
return;
}
pMainWnd->MDINext();
pMDIChild = pMainWnd->MDIGetActive();
if (pMDIChildFirst == pMDIChild)
{
break;
}
}
2. 为什么我用这样的代码不能设置断点呢?把红色的去掉就可以设置
等待一会就结贴了 根本问题解决了 但出现的问题不理解