-
June 21st, 2005, 02:59 PM
#1
Normal vs. Large size fonts problem
I have developed an video application that has a video region as well as static text around the video region. I developed this on my laptop with the Display screen resolution set to 1920x1200 with Large size fonts (set in the Advanced section). I just changed the Display font size from Large size (DPI 120) to Normal size (DPI 96) and now the layout of all my static text is all screwed up.
My first question is how do I determine at runtime whether the Display is set for Large or Normal sizie fonts?
What is the prefered methof to deal with this? Should I first check the font size and then pick the resource that lays out my static text accordingly?
Thanks in advance for any help.
-Andres
-
June 21st, 2005, 03:12 PM
#2
Re: Normal vs. Large size fonts problem
I think you can use the SystemParametersInfo() function with the SPI_GETNONCLIENTMETRICS flag. This should fill a NONCLIENTMETRICS structure that contains LOGFONTS for the current system fonts.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-
June 21st, 2005, 03:24 PM
#3
Re: Normal vs. Large size fonts problem
Thank you for your reply. I will try that.
What is the preferable way to deal with this? Should I layout a totally different resource for each font size?
Thanks,
-Andres
-
June 21st, 2005, 03:39 PM
#4
Re: Normal vs. Large size fonts problem
I think you can use the SystemParametersInfo() function with the SPI_GETNONCLIENTMETRICS flag. This should fill a NONCLIENTMETRICS structure that contains LOGFONTS for the current system fonts.
well this will work but it will change the font in all the system applictions i am not sure u will want it.
other way you can try is create CFont object in your app with fixed size and set it to all the controls you are having in the dialogs with the SetFont ( ) api.
if i helped dont forget to rate :-)
Cheers
-
June 21st, 2005, 05:16 PM
#5
Re: Normal vs. Large size fonts problem
Originally Posted by golanshahar
if i helped dont forget to rate :-)
Cheers
Please excuse my ignorance, but I do not know what this means. Do I "rate" responses?
I appreciate your response and your suggestion (to use a fixed font) is good. You have helped me--thank you. Where do I rate this response?
-Andres
-
June 21st, 2005, 08:14 PM
#6
Re: Normal vs. Large size fonts problem
At the top-right corner of every post in a thread, you will see a link "Rate this post" . Click on it to "approve" or "disapprove" a post.
-
June 22nd, 2005, 08:32 AM
#7
Re: Normal vs. Large size fonts problem
Originally Posted by golanshahar
well this will work but it will change the font in all the system applictions i am not sure u will want it.
Cheers
I wasn't suggesting that he change the system font -- only inquire, then set his program's accordingly.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|