1: 得到系统时间日期(使用GetLocalTime)
CString sTime,sYear,sMonth,sDay;
SYSTEMTIME CurTime;
GetLocalTime(&CurTime);
sYear.Format("%d年",CurTime.wYear);
sMonth.Format("%d月",CurTime.wMonth);
sDay.Format("%d日",CurTime.wDay);
sTime = sYear+ sMonth + sDay;
// CurTime.wHour
// CurTime.wMinute
// CurTime.wSecond IBM的
AfxMessageBox(sTime);
2: 分离字串
CString str = "4d3f0a2278";
unsigned char a[12];
long x;
for(int i = 0;i< (str.GetLength()/2);i++)
{
sscanf(str.Mid(2*i,2),"%x",&x);
a[i] = x;
}
3: 得到当前目录 (GetCurrentDirectory)
char CurPath[MAX_PATH];
DWORD size=MAX_PATH;
GetCurrentDirectory(size,CurPath);
AfxMessageBox(CurPath);
//
CString number;
int len = LineLength(LineIndex(0));
LPTSTR p=number.G