对于MDI程序中打开的多个文档,我要得到所有文档的路径,如何实现枚举?
解决方案 »
- richedit 实时显示内容
- 怎么通过小波变换获取图像低频系数?
- 如何获取IE打开的网站的URL并知道是否点击了提交?
- FINDWINDOWEX的问题
- 问大虾一个问题:如何使用Help WorkShop的工具制作帮助文件?
- 老师布置了研究生阶段的课题,请教一下
- why the systen current time display is not correct?
- 请问DCOM调用是不是用IIOP协议?
- 运行出现下列问题,求大神解决?
- 这两个读字符串的函数有什么区别呀,为什么我的会出错,帮忙考虑一下特殊情况。感激不尽
- 升星,散分~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 如何改变TAB控件的字体?
ASSERT_VALID( pApp );// 1 - Iterate through the application's document
// templates list
POSITION posTemplate =
pApp->GetFirstDocTemplatePosition();
while( posTemplate != NULL )
{
// 2 - For each document template object...
CDocTemplate* pTemplate =
pApp->GetNextDocTemplate( posTemplate );
ASSERT_VALID( pTemplate );
ASSERT_KINDOF( CDocTemplate, pTemplate ); // 3 - Iterate through the template's document list
POSITION posDocument =
pTemplate->GetFirstDocPosition();
while( posDocument != NULL )
{
// 4 - For each document object...
CDocument* pDoc =
pTemplate->GetNextDoc( posDocument );
ASSERT_VALID( pDoc );
ASSERT_KINDOF( CDocument, pDoc );
CString strDocName = pDoc->GetPathName();//This is the document' path
if( strDocName.IsEmpty() )
strDocName = pDoc->GetTitle();
}
}