谢谢!
解决方案 »
- 求助:如何获取当前活动子页面的指针
- 开发团队找VC++的活,在哪儿发这种信息比较合适呢?
- 请教,如何在一个单文档的程序中根据起动时给的参数调用不同的FORMVIEW资源.
- .db如何转入.xls 高分回报!急急急!!!!!!!!!
- 请问怎么得到一个非程序文件相关联程序文件的路径,比如一个文本文件,怎么得到记事本的路径?
- 关于扫雷程序
- 这个SQL语句该怎么写?
- 一个与VSFelxGrid控件和COM有关的问题,请各位大侠一定帮帮忙!!!,200分不成敬意!
- 一个简单的问题?
- 我很想学习C++,但是目前市面上的学习类书籍太多我不知道究竟要如何选择??
- 请VC高手帮忙!
- 从 IE 中拖放一个超链接到我的窗口中,如何得到此超链接的内容?[100分]
CString strTemp;
TCHAR chTemp[MAX_PATH];strDefaultPath = "00";
GetPrivateProfileString(_T("设置"),_T("路径"),strDefaultPath,chTemp,MAX_PATH,"c:\ad.ini");
//chTemp就是xxx (路径 = xxxx)
GetPrivateProfileInt
SetPrivateProfileString
SetPrivateProfileInt
LPCTSTR lpAppName, // section name
LPCTSTR lpKeyName, // key name
LPCTSTR lpDefault, // default string
LPTSTR lpReturnedString, // destination buffer
DWORD nSize, // size of destination buffer
LPCTSTR lpFileName // initialization file name
);
UINT GetPrivateProfileInt(
LPCTSTR lpAppName, // section name
LPCTSTR lpKeyName, // key name
INT nDefault, // return value if key name not found
LPCTSTR lpFileName // initialization file name
);
WritePrivateProfileString
The WritePrivateProfileString function copies a string into the specified section of an initialization file. Note This function is provided only for compatibility with 16-bit versions of Windows. Win32-based applications should store initialization information in the registry. BOOL WritePrivateProfileString(
LPCTSTR lpAppName, // section name
LPCTSTR lpKeyName, // key name
LPCTSTR lpString, // string to add
LPCTSTR lpFileName // initialization file
);