Hi,
I can see no trouble. just create a methos that will accepst a an ID of the compopmnent to which you want to set the font. The in the method, you load/create the font for given component/window and set it to that component.
void CMyDialogWindow::SetComponentFont(intiComponentId)
{
CWnd* pComponent = this->GetDlgItem();
if (pComponent != NULL)
{
CFont* pFont = CreateOrLoadMyWonderfulFont();
if (pFont != NULL)
{
pComponent->SetFont(pFont);
}
}
}
For more info about the CWnd::GetDlgItem(int nId) see
MSDN. For more info about the CWnd::SetFont(CFont* pFont) see
MSDN.
Hope this helps.
Best regards,
J.K.