I need to change the font size in my ATL dialog templates at runtime (so that the entire dialog gets rescaled). What is the best approach to do this? The only solution I've found in the forums does this in a MFC project by modifying the dialog template. I've looked at the MFC source but it does not seem to be an easy task to port it to ATL for my own use. Here is the MFC code:
INT_PTR MyDlg::DoModal()
{
CDialogTemplate dlt;
int nResult;
if (!dlt.Load(MAKEINTRESOURCE(MyDlg::IDD)))
return -1;
dlt.SetFont("MS Sans Serif", 13);
LPSTR pdata = (LPSTR)GlobalLock(dlt.m_hTemplate);
m_lpszTemplateName = NULL;
InitModalIndirect(pdata);
nResult = CDialog::DoModal();
GlobalUnlock(dlt.m_hTemplate);
return nResult;
}
Does anyone have an example of how to do this with ATL?
AliciaV