This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include | |
main() | |
{ | |
char MyDir[MAX_PATH]; | |
SHGetSpecialFolderPath(NULL,MyDir,CSIDL_APPDATA,0); // CSIDL_APPDATA 获取的是 APPDATA的路径,其它路径可以去看MSDN | |
// 微软推荐用这个API SHGetKnownFolderPath ,但这个API不能向下兼容,到xp就用不了 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void toLowerCase( std::string& str ) | |
{ | |
std::transform( | |
str.begin(), | |
str.end(), | |
str.begin(), | |
tolower); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
del /F /A /Q *.sdf | |
del /F /A /Q *.suo | |
del /F /A /Q *.opensdf | |
rd /s/q "DuiLib\Release_u" | |
rd /s/q "DuiLib\Debug_u" | |
rd /s/q "DuiLib\Release" | |
rd /s/q "DuiLib\Debug" | |
rd /s/q "DuiLib\Build" | |
rd /s/q "_UpgradeReport_Files" | |
rd /s/q "LoginDemo\Debug" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdio.h> | |
bool ctrlhandler( DWORD fdwctrltype ) | |
{ | |
switch( fdwctrltype ) | |
{ | |
// handle the ctrl-c signal. | |
case CTRL_C_EVENT: | |
printf( "ctrl-c event\n\n" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HINSTANCE instance = AfxGetInstanceHandle(); | |
// 定位资源 | |
HRSRC hRsrc = FindResource(instance, MAKEINTRESOURCE(IDR_FILE1), _T("File")); | |
// 获取资源大小 | |
DWORD dwSize = SizeofResource(instance, hRsrc); | |
assert(dwSize != 0); | |
// 加载资源 | |
HGLOBAL hGlobal = LoadResource(instance, hRsrc); |