MFC 设置所有控件的字体

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013183287/article/details/88012882
void SetChildWndFont(HWND hWndParent, CFont *pFont)
{
	if (!pFont)
		return;

	CWnd * pWnd = NULL;
	pWnd = CWnd::FromHandle(::GetWindow(hWndParent, GW_CHILD));
	while(pWnd)
	{
		pWnd->SetFont(pFont);
		pWnd = pWnd->GetNextWindow();
	}
}

猜你喜欢

转载自blog.csdn.net/u013183287/article/details/88012882
今日推荐