Solved

Font Dialog

Posted on 2000-04-05
4
367 Views
Last Modified: 2013-12-03
How do i set a font size..in CFontDialog
so it will be a default size when i call the dialog
0
Comment
Question by:yans
  • 2
4 Comments
 
LVL 4

Expert Comment

by:captainkirk
ID: 2686954
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
 
LVL 1

Author Comment

by:yans
ID: 2695974
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
 
LVL 1

Accepted Solution

by:
Dhrubajyoti earned 10 total points
ID: 2733423
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
 
LVL 1

Author Comment

by:yans
ID: 2733542
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
if loop in java 3 142
withoutTen challenge 14 123
wordappend challenge 8 180
Way to decrease size of apk file 9 70
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question