如下:
void Auto_DataBase::initFont()
{CWnd *win = GetWindow(GW_CHILD);
while (win)
{
win->SetFont(&m_font12);
win = win->GetWindow(GW_HWNDNEXT);
}
}
Unicode:
while (win)
{
memset(cClassName, 0, sizeof(cClassName));
GetClassName(win->GetSafeHwnd(), cClassName, 255);
if (_tcsicmp(cClassName, _T("Edit")) == 0)
{
win->SetWindowPos(NULL, 0, 0, 20, 100, SWP_NOZORDER | SWP_NOMOVE);
}
win->SetFont(&m_font12);
win = win->GetWindow(GW_HWNDNEXT);
}