Reputation: 382
I am working on a project where I need to create a font dialog box on a button click.
I used below code:
CFontDialog dlg;
if (dlg.DoModal() == IDOK)
{
m_Font = dlg.GetFont();
}
But here problem is..by default it contains various settings like font family, size, style, color and preview. But here I need only Fontfamily and size and preview settings only.
Is there any alternate to create font dialog box only with "font family, size and preview) without creating any child class.
Upvotes: 0
Views: 238
Reputation: 15375
Modify the m_cf.flags
member in the dlg object, like CF_EFFECTS
etc.
See documentation and change the flags accordingly
Upvotes: 1