经典API记载

调用的时候只要将按钮的FlatStyle设置为System,然后采用如下的代码就可以了,最后一项如果设为0的话则会取消显示UAC的盾牌图标。
::SendMessage(((CButton *)GetDlgItem(IDC_BTN_TEST3))->m_hWnd, BCM_SETSHIELD, 0, 1);
UAC盾牌的系统图标的ID是77
highestAvailable按当前账号能获取到的权限执行,而requireAdministrator则是以具有完整权限的管理员运行。如果当前账户是管理员账户的话,那么两者都是可以的通过提升权限来获取到管理员权限的;而如果当前账户是Guest的话,那么highestAvailable则放弃提升权限而直接运行,而requireAdministrator则允许输入其他管理员账户的密码来提升权限。


字符串分割函数
AfxExtractSubString :


获取后缀名,如file.txt,返回.txt
PathFindExtension


Removes the file extension from a path, if one is present.输入C:\\TEST\\sample.txt,输出C:\TEST\sample
void PathRemoveExtension(LPTSTR pszPath);


Replaces the extension of a file name with a new extension. If the file name does not contain an extension, the extension will be attached to the end of the string.
输入C:\\TEST\\sample.txt和.log,输出C:\\TEST\\sample.log
BOOL PathRenameExtension(LPTSTR pszPath, LPCTSTR pszExt);



获取全路径中的目录,如输入C:\TEST\sample.txt,调用后为C:\TEST
CStringW strTmp(wcPathName);//C:\TEST\sample.txt
::PathRemoveFileSpecW(strTmp.GetBuffer());
strTmp.ReleaseBuffer();//C:\TEST


获取文件名
LPTSTR PathFindFileName(LPCTSTR pPath);


获取ini文件中结构体
GetPrivateProfileStruct

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值