VC获得系统文件夹路径

2014-11-23 20:18:02 · 作者: · 浏览: 68
CHAR Buffer[MAX_PATH];
GetWindowsDirectory(Buffer,MAX_PATH);
GetDlgItem( IDC_EDIT1)->SetWindowText(Buffer);
CString str;
str.Format("%d",MAX_PATH);
GetDlgItem(IDC_EDIT2)->SetWindowText(str);