Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Font Dialog

Posted on 2000-04-05
4
Medium Priority
?
400 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 30 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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

604 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