1: Get the system time dates (using getLocaltime) CString Stime, Syear, SMONTH, SDAY; SystemTime Curtime; getLocalTime (& Curtime); Syar.Format ("% D years", curtime.wyear); smonth.format ("% D Month) ", Curtime.wmonth; sday.format ("% d day ", curtime.wday; stime = syear smhood sday; // curtime.wHour // curtime.wminute // curtime.wSecond IBM AFXMESSAGEBOX (STIME) ; 2: Separation string 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: get the current directory (getCurrentDirectory) char Curpath [max_path]; dword size = max_path; getCurrentDirectory (Size, Curpath); AFXMessageBox (Curpath); // cstring number; int Len = lineLength; lPtstr P = Number.getBuffer (LEN); this-> getLine (0, p, len); afxMessageBox (Number); get system GetSystemDirectory 4: Extract digital CString Strnum; CString STR ("test 125 countries 87kk"); Strnum = getStr (STR); AFXMessageBox (Strnum); 5: Create a Molding dialog CDLG_Test * aa = New CDLG_Test; AA-> Create (IDD_DIALOG1, NULL); AA-> ShowWindow (sw_show); 6: Get window absolute coordinate CST Ring Strnum, Strnum1; CRECT Rect; getClientRect (& Re); ClientToscreen (& Re); strnum.format ("x:% d", rect.top); strnum1.format ("Y:% D", Rect.Left); Strnum = Strnum Strnum1; AFXMessageBox (Strnum); 7: Copy Folder ShfileOpstruct Op; char frombuf [] = "E: // Temp / 0"; char tobuf [] = "sintekserver // personal document // Chen Wei / 0 ";; Op.hwnd = NULL; Op.wFunc = FO_COPY; Op.pFrom = FromBuf; Op.pTo = ToBuf; Op.fFlags = FOF_NOCONFIRMATION | FOF_RENAMEONCOLLISION; Op.fAnyOperationsAborted = FALSE; Op.hNameMappings = NULL; Op. LPSZProgressTitle = NULL;