void ScrollMessageBox(CEdit* msgbox)
{
msgbox->SendMessage(WM_VSCROLL, SB_BOTTOM);
}
ReSize Dialog
CRect rect;
GetClientRect(rect);
OnSize(0, rect.Width(), rect.Height());
GetCompileDateTime
CString GetCompileDateTime(void)
{
CString ret;
ret.Format("Date:%s Time:%s",__DATE__, __TIME__);
return ret;
}
AddPunctuation
CString AddPunctuation(LPCTSTR text, UINT term, LPCTSTR punct)
{
CString ret;
ret.Format("%s", text);
int end = (ret.GetLength() - 1) / term;
for (int k = 0; k < end; k++)
{
ret.Insert(ret.GetLength() - (k + 1) * term - k * strlen(punct), punct);
}
return ret;
}
CheckFileExist
bool CheckFileExist(CString filename)
{
CFileFind filefind;
return filefind.FindFile(filename);
}