Click here to Skip to main content
15,900,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCDC Pin
viliam27-Jan-04 22:14
viliam27-Jan-04 22:14 
GeneralRe: CDC Pin
Antti Keskinen28-Jan-04 1:59
Antti Keskinen28-Jan-04 1:59 
GeneralRe: CDC Pin
Mike Dimmick28-Jan-04 2:15
Mike Dimmick28-Jan-04 2:15 
Generalmanaged c++ and licenses Pin
Roger Alsing27-Jan-04 21:38
Roger Alsing27-Jan-04 21:38 
GeneralGetting the Windows FontWidth Pin
Pazzuzu27-Jan-04 21:28
Pazzuzu27-Jan-04 21:28 
GeneralRe: Getting the Windows FontWidth Pin
Antti Keskinen27-Jan-04 21:46
Antti Keskinen27-Jan-04 21:46 
GeneralRe: Getting the Windows FontWidth Pin
Pazzuzu27-Jan-04 22:00
Pazzuzu27-Jan-04 22:00 
GeneralRe: Getting the Windows FontWidth Pin
Antti Keskinen28-Jan-04 1:39
Antti Keskinen28-Jan-04 1:39 
This is what MSDN says about the lfWidth parameter:

If lfWidth is zero, the aspect ratio of the device is matched against the digitization aspect ratio of the available fonts to find the closest match, determined by the absolute value of the difference.

Otherwise, the lfWidth determines the average width of the font, in logical units. Apparently your only way now is to test it yourself: use the routine I gave you, but instead of multiplying with the 'Character Ratio', multiply the ratio itself with a certain parameter and then insert it into the lfWidth parameter directly. As you request the LOGFONT made by CreatePointFont, it should return zero in lfWidth (see above, in italics).

Instead, just give some arbitary values to lfWidth, see how your text behaves, draw a conclusion and implement a routine for your stretching.

I don't have any sample code available currently, so you'll just have to experiment yourself.

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: Getting the Windows FontWidth Pin
Pazzuzu27-Jan-04 23:04
Pazzuzu27-Jan-04 23:04 
GeneralPaste gif, jpg images Pin
Filomela27-Jan-04 20:25
Filomela27-Jan-04 20:25 
GeneralRe: Paste gif, jpg images Pin
CodeBrain28-Jan-04 21:22
CodeBrain28-Jan-04 21:22 
GeneralRe: Paste gif, jpg images Pin
Filomela29-Jan-04 20:34
Filomela29-Jan-04 20:34 
GeneralRe: Paste gif, jpg images Pin
CodeBrain29-Jan-04 21:30
CodeBrain29-Jan-04 21:30 
GeneralRe: Paste gif, jpg images Pin
Filomela1-Feb-04 20:55
Filomela1-Feb-04 20:55 
GeneralRe: Paste gif, jpg images Pin
CodeBrain1-Feb-04 21:12
CodeBrain1-Feb-04 21:12 
GeneralRe: Paste gif, jpg images Pin
CodeBrain2-Feb-04 3:02
CodeBrain2-Feb-04 3:02 
GeneralRe: Paste gif, jpg images Pin
Filomela2-Feb-04 20:35
Filomela2-Feb-04 20:35 
GeneralRe: Paste gif, jpg images Pin
CodeBrain2-Feb-04 21:16
CodeBrain2-Feb-04 21:16 
GeneralRe: Paste gif, jpg images Pin
Filomela16-Feb-04 20:23
Filomela16-Feb-04 20:23 
GeneralRe: Paste gif, jpg images Pin
Filomela26-Mar-04 4:55
Filomela26-Mar-04 4:55 
GeneralAuthenticate the remote user credentials Pin
Mr Bose Dayala27-Jan-04 19:47
Mr Bose Dayala27-Jan-04 19:47 
GeneralFocus problem! Pin
rohit.dhamija27-Jan-04 19:28
rohit.dhamija27-Jan-04 19:28 
GeneralRe: Focus problem! Pin
Antti Keskinen27-Jan-04 21:15
Antti Keskinen27-Jan-04 21:15 
GeneralMore Help Plz Pin
MrNiceBerG27-Jan-04 18:39
MrNiceBerG27-Jan-04 18:39 
GeneralTrying to capture the screen, Getting some Error Pin
santosh k27-Jan-04 18:24
santosh k27-Jan-04 18:24 

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.