Link to home
Start Free TrialLog in
Avatar of yans
yans

asked on

Font Dialog

How do i set a font size..in CFontDialog
so it will be a default size when i call the dialog
Avatar of captainkirk
captainkirk

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();
Avatar of yans

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Dhrubajyoti
Dhrubajyoti

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yans

ASKER

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