• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

Font Dialog

How do i set a font size..in CFontDialog
so it will be a default size when i call the dialog
0
yans
Asked:
yans
  • 2
1 Solution
 
captainkirkCommented:
use a LOGFONT structure and fill it out before contructing the CFontDialog:

LOGFONT lfInitial;
lfInitial.lfHeight = nSomeHeight;
// etc...


CFontDialog(&lfInitial, CF_EFFECTS | CF_SCREENFONTS, NULL, NULL);

dlg.DoModal();
0
 
yansAuthor Commented:
Height of the font is not his size..
as i see there are a special way to set a size value...pls if you know how..
help me with it.
0
 
DhrubajyotiCommented:
cfont dialog has a data member m_cf
m_ch has a member iPointSize which
holds the size;
  One more data memeber of m_cf  is Flags set this member to customise the dialog

 
0
 
yansAuthor Commented:
i Tried that, it doesnt change the size of the diaolog,i put a value in it and nothing happends ,pls maybe youy can write some sample code,it will be very helpfull:)
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now