Click here to Skip to main content
15,888,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionin CExplorer1 class, how to post your form data to the server,as login data. Pin
cwj_5-May-09 16:20
cwj_5-May-09 16:20 
AnswerRe: in CExplorer1 class, how to post your form data to the server,as login data. Pin
Madhu Nair5-May-09 18:59
Madhu Nair5-May-09 18:59 
QuestionWhen IS CFont create for the Bottomless CRichEdit ???? Pin
ForNow5-May-09 13:28
ForNow5-May-09 13:28 
AnswerRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
Stuart Dootson5-May-09 14:41
professionalStuart Dootson5-May-09 14:41 
GeneralRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
ForNow5-May-09 14:51
ForNow5-May-09 14:51 
GeneralRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
Stuart Dootson5-May-09 15:14
professionalStuart Dootson5-May-09 15:14 
GeneralRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
ForNow5-May-09 15:20
ForNow5-May-09 15:20 
AnswerRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
Randor 5-May-09 16:17
professional Randor 5-May-09 16:17 
Hi,

I gave you the answer yesterday[^]. In addition it seems that you may have a misunderstanding of how fonts are rendered. Its not an accident that the CHARFORMAT[^] and CHARFORMAT2[^] structures contains no width member. Even the lfWidth member of the LOGFONT structure[^] is described as the average.

Most fonts are variable width[^] which means that you cannot always take the width of the letter 'i' for example and multiply it by the number of characters in a paragraph and have it equal the width in pixels. You may however be able to do this with fixed-width/Monospaced fonts[^]. But it gets tricky... the rich edit control may be performing additional kerning[^] which has an effect on the character spacing between known kerning pairs. The font pitch[^] will have an effect on how many characters are rendered on each line.

Some documentation which may assist you:

GetTextExtentPoint32 Function[^]
How To Fit Strings by Truncating with an Ellipsis[^]
Using GetCharABCWidths() to Calculate Text Extents[^]
GetCharWidth32 Function[^]

Hope this helps,
-David Delaune
QuestionRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
David Crow5-May-09 16:34
David Crow5-May-09 16:34 
AnswerRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
ForNow5-May-09 16:59
ForNow5-May-09 16:59 
GeneralRe: When IS CFont create for the Bottomless CRichEdit ???? Pin
ForNow6-May-09 4:42
ForNow6-May-09 4:42 
Questioncan VC++ 6.0 talk with SharePoint Server Pin
s33335-May-09 10:24
s33335-May-09 10:24 
AnswerRe: can VC++ 6.0 talk with SharePoint Server Pin
Stuart Dootson5-May-09 10:37
professionalStuart Dootson5-May-09 10:37 
QuestionSemaphore Max count. Pin
_80865-May-09 6:57
_80865-May-09 6:57 
AnswerRe: Semaphore Max count. Pin
Stuart Dootson5-May-09 7:26
professionalStuart Dootson5-May-09 7:26 
GeneralRe: Semaphore Max count. Pin
_80865-May-09 16:36
_80865-May-09 16:36 
GeneralRe: Semaphore Max count. Pin
Stuart Dootson5-May-09 17:00
professionalStuart Dootson5-May-09 17:00 
GeneralRe: Semaphore Max count. Pin
_80865-May-09 17:20
_80865-May-09 17:20 
GeneralRe: Semaphore Max count. Pin
_80866-May-09 6:36
_80866-May-09 6:36 
GeneralRe: Semaphore Max count. Pin
Stuart Dootson6-May-09 7:24
professionalStuart Dootson6-May-09 7:24 
GeneralRe: Semaphore Max count. Pin
_80866-May-09 16:23
_80866-May-09 16:23 
GeneralRe: Semaphore Max count. Pin
Stuart Dootson6-May-09 19:32
professionalStuart Dootson6-May-09 19:32 
QuestionHelp about Win32 Message loop Pin
reply2am5-May-09 4:48
reply2am5-May-09 4:48 
QuestionAnimatedGif drawing with openGL Pin
Jufranz5-May-09 4:10
Jufranz5-May-09 4:10 
QuestionHow to Convert _asm to Interinsics Pin
AB_dev5-May-09 3:32
AB_dev5-May-09 3:32 

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.