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
Solved

Font height in RichEdit control

Posted on 1998-11-27
2
379 Views
Last Modified: 2013-12-03
I'm using a richedit control as a editor in an application that is producing information to be displayed on screen. We want the font sizes to be always the same regardless of the
Windows settings so I'm using the Height property to specify the pixel height rather use the the Size property.
The problem is that certain pixel heights cannot be selected in the richedit. It appears  that only heights that map directly to point sizes are allowed. For example at the standard small fonts setting of 96dpi, a 14 point font is 19 pixels high, and can be shown. But at the large font setting of 120dpi there is no point size corresponding to this height and the richedit control changes the height to 18.

Any suggestions?

Terry Farmer
0
Comment
Question by:tfarmer
2 Comments
 
LVL 2

Expert Comment

by:brainware
ID: 1348250
What about Reading the Font Settings in Registry and use the font+sizes user have configured?
The info stored in windows is not the dpi/pixels but Font Size?
or do i remember wrong..
0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 200 total points
ID: 1348251
The problem here is that WIN32 can't cope with fractional font sizes in terms of points (the fact that Word can do this is because they fudge it knowing that when they kick it out to the printer they can round it off in the more precise resolution of the printer to make fractional point fonts work - though they will not change size on screen necessarily).

Unfortunately you are between a rock and a hard place - is the one or two pixel error too much?

Cheers,

Raymond.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 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