Solved

Font Dialog

Posted on 2000-04-05
4
383 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Shell script to login to remote m/c and execute commands 10 80
while loop over for loop 7 119
viewing source code from eclipse 13 111
Increment column based of a FK 8 67
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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…

732 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