Click here to Skip to main content
15,887,477 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: GetCharABCWidthsFloat returns different values on XP, Vista and Windows 7 Pin
Code-o-mat26-Aug-11 3:03
Code-o-mat26-Aug-11 3:03 
GeneralRe: GetCharABCWidthsFloat returns different values on XP, Vista and Windows 7 Pin
transoft26-Aug-11 4:16
transoft26-Aug-11 4:16 
QuestionRe: GetCharABCWidthsFloat returns different values on XP, Vista and Windows 7 Pin
MicroVirus26-Aug-11 6:00
MicroVirus26-Aug-11 6:00 
AnswerRe: GetCharABCWidthsFloat returns different values on XP, Vista and Windows 7 Pin
transoft26-Aug-11 6:11
transoft26-Aug-11 6:11 
GeneralRe: GetCharABCWidthsFloat returns different values on XP, Vista and Windows 7 Pin
jeron126-Aug-11 7:48
jeron126-Aug-11 7:48 
GeneralRe: GetCharABCWidthsFloat returns different values on XP, Vista and Windows 7 Pin
transoft26-Aug-11 8:00
transoft26-Aug-11 8:00 
AnswerRe: GetCharABCWidthsFloat returns different values on XP, Vista and Windows 7 Pin
Charles Oppermann26-Aug-11 10:35
Charles Oppermann26-Aug-11 10:35 
GeneralRe: GetCharABCWidthsFloat returns different values on XP, Vista and Windows 7 Pin
enhzflep26-Aug-11 15:52
enhzflep26-Aug-11 15:52 
I saw this question about a minute after you posted it. Having never heard of the function before I started looking into it, finding as others have mentioned that the values are supposed to depend on a number of different things.

Immediately, I set to work whipping up an application to test the function. No matter what I thought of to try,I couldn't get the vales returned to change. I ran the app both under XP 32 bit and Win7 64 bit. Each OS returned the same values, as did each font I tried (only tried 2) as did each font-size and weight I tried. Win7 has clear-type enabled, XP doesn't. Win7 running on my laptop, XP running in a virtual machine on the same laptop.

This made it clear to me that I wasn't qualified to even begin to answer your question. Though, still I couldn't help wondering why it was such a problem. Surely different conditions would mean that the mapping between logical width and number of pixels would change.

Take for example, the dialog units that are used. (on dialogs, oddly enough) These vary based upon the size of the chosen dialog font. This allows an app to continue to look right whether your default text size is 11pt and you use it as a desktop 1 foot in front of you, or if you have text-size set to 30pt and you use it as a media-pc, hooked up to your telly. This is one of the differences between regular windows and media-center edition - the default text size.


I would suggest that you mention why it matters to you if the function returns different values. There is after all, a transformation that happens to these values before they are ultimately used, so why can't you also do this transformation before you do your calculations?

The clearer you make your problem, the more likely you are to get a solution that's a good fit!
GeneralRe: GetCharABCWidthsFloat returns different values on XP, Vista and Windows 7 Pin
transoft26-Aug-11 16:51
transoft26-Aug-11 16:51 
QuestionUsing MFC to Host a WebBrowser Control Pin
geofftop25-Aug-11 3:10
geofftop25-Aug-11 3:10 
Questionhow compiler differentiates inline virtual function? [modified] Pin
yogish29325-Aug-11 2:57
yogish29325-Aug-11 2:57 
AnswerRe: how compiler differentiates inline virtual function? Pin
CPallini25-Aug-11 3:27
mveCPallini25-Aug-11 3:27 
GeneralRe: how compiler differentiates inline virtual function? Pin
Niklas L25-Aug-11 21:36
Niklas L25-Aug-11 21:36 
GeneralRe: how compiler differentiates inline virtual function? Pin
CPallini25-Aug-11 21:50
mveCPallini25-Aug-11 21:50 
GeneralRe: how compiler differentiates inline virtual function? Pin
Stefan_Lang25-Aug-11 22:31
Stefan_Lang25-Aug-11 22:31 
AnswerRe: how compiler differentiates inline virtual function? Pin
Stefan_Lang25-Aug-11 3:34
Stefan_Lang25-Aug-11 3:34 
QuestionHow to get attachment filename without download attachment file? Pin
R_K25-Aug-11 2:39
R_K25-Aug-11 2:39 
QuestionRe: How to get attachment filename without download attachment file? Pin
MicroVirus25-Aug-11 2:41
MicroVirus25-Aug-11 2:41 
AnswerRe: How to get attachment filename without download attachment file? Pin
R_K25-Aug-11 5:24
R_K25-Aug-11 5:24 
GeneralRe: How to get attachment filename without download attachment file? Pin
enhzflep25-Aug-11 6:43
enhzflep25-Aug-11 6:43 
QuestionProblem in accessing virtual hard as local hard disk Pin
Chattha1125-Aug-11 1:27
Chattha1125-Aug-11 1:27 
AnswerRe: Problem in accessing virtual hard as local hard disk Pin
Code-o-mat25-Aug-11 7:42
Code-o-mat25-Aug-11 7:42 
Questiondetect memory leak Pin
zon_cpp25-Aug-11 0:09
zon_cpp25-Aug-11 0:09 
GeneralRe: detect memory leak Pin
Rage25-Aug-11 0:22
professionalRage25-Aug-11 0:22 
AnswerRe: detect memory leak Pin
Alan Balkany25-Aug-11 5:07
Alan Balkany25-Aug-11 5:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.