最近做的MFC项目中,有个获取其他进程中Edit控件内容的需求,本来以为是个很简单的问题,但是来来回回折腾了不少时间,发博记录一下. 刚开始拿到这个问题,很自然的就想到GetDlgItemText(): UINT GetDlgItemText( HWND hDlg, // handle to dialog box int nIDDlgItem, // control identifier LPTSTR lpString, // pointer to buffer for text int nMa
获取本地时间 typedef struct _SYSTEMTIME { WORD wYear; WORD wMonth; WORD wDayOfWeek; WORD wDay; WORD wHour; WORD wMinute; WORD wSecond; WORD wMilliseconds; } SYSTEMTIME, *PSYSTEMTIME; 1 2 3 4 5 6 7 8 9 10 11 1.GetLocalTime获取的是本地时区时间 SYSTEMTIME localSysTime;