CDialog的标题/标题的字体样式 [英] Font style of caption/title of CDialog
本文介绍了CDialog的标题/标题的字体样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想更改 Dialog 的标题/标题的字体样式和字体大小(源自 CDialog).因为标题/标题与任何资源 ID 无关,所以我什至不能使用 SetFont().Tell>
I want to change the font style and font size of title/caption of Dialog(Derived from CDialog).Since caption/title is not associated with any resource id so i can't even use SetFont().Tell
推荐答案
抱歉 - 我没有格式化评论 - 我发现的所有提示都不起作用......所以我将其作为答案发布在这里:
Sorry - I'm failing to format a comment - all hints I found don't work... So I post it as an answer here:
另一个注意事项:如果您想更改对话框中项目的字体,请不要参考帮助 ID,而是参考资源 ID.像这样:
And another note: If you want to change the font for items in the dialog, don't refer to the help id, but to the resource id. Like this:
INT_PTR CModifyDialogDlg::DoModal()
{
dlgtemplate.Load(m_lpszTemplateName);
dlgtemplate.SetFont(ms_DefaultFontFace, (WORD)m_LogFontHeight);
DLGTEMPLATE *pDlgTemplate = (DLGTEMPLATE*)GlobalLock(dlgtemplate.m_hTemplate);
m_lpszTemplateName = NULL;
BOOL retVal = InitModalIndirect(pDlgTemplate);
GlobalUnlock(dlgtemplate.m_hTemplate);
return __super::DoModal();
}
这篇关于CDialog的标题/标题的字体样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文