Solved

Font Dialog

Posted on 2000-04-05
4
358 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
iSeries DB2 Query 2 91
Fibonacci challenge 11 112
Problem to event 3 79
unix example issues 18 76
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now