首页 > 编程知识 正文

c语言把数添加进数组,c语言中什么是全局变量

时间:2023-05-04 13:34:06 阅读:145105 作者:3244

文件对话框constcharpszfilter [ ]=_ t (exefile (*.txt )|.txt|allfiles )|*.*|| ' );

cfiledialogDLG(true、NULL、NULL、ofn _ hidereadonly|ofn _ overwrite prompt,

pszFilter,this;

DLG.m _ ofn.lpstrinitialdir=' c :\ windows\ "; //设置对话框默认情况下绘制的路径

if(DLG.domodal(==idok ) )。

{

ctringstrfilepath=DLG.get pathname (;

/*如果有多个文件

for (position pos=DLG.get start position ); 销售点!=NULL; )

{

ctringstrfilepathname=DLG.get next pathname (pos );

*/

}

“保存”对话框constcharpszfilter [ ]=_ t (exefiles (*.txt )|*.txt|| ' );

cfiledialogdlgsave (假,//假保存

_t(.txt ),//自动附加的扩展名

_t(output.txt )、//默认保存的文件名

ofn _ hidereadonly|ofn _ overwrite prompt,

pszFilter,this;

目录选择对话框

浏览信息Bi;

char szPathName[MAX_PATH];

char szTitle[]='选择路径';

零内存(bi,sizeof ) browseinfo );

bi.hwndOwner=GetSafeHwnd (;

bi.pszDisplayName=szPathName;

bi.lpszTitle=szTitle;

bi.ulFlags=0x0040;

CString str;

CString strDir; //选定的目录

lpitemidlistidl=shbrowseforfolder (bi;

if(IDL==null )。

{

strDir=' ';

返回;

}

shgetpathfromidlist(IDL,str.getbuffer ) max_path*2);

str.ReleaseBuffer (;

if(str!=''str.getat(str.getlength ) (- 1 )!='\ "

str ='\ ";

strDir=str;

posted on 2006-12-06 16:17永生乐读(12537 )评论)0)编辑收藏引用所属分类: Windows MFC

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。