Re: SetTextCharacterExtra
- From: "Alex Blekhman" <tkfx.REMOVE@xxxxxxxxx>
- Date: Wed, 15 Oct 2008 15:42:32 +0200
"TOB" wrote:
//Why does DrawText sometimes overlap characters
//Thank you,
//Tim
pDC->SetMapMode(MM_HIMETRIC);
pDC->SetTextCharacterExtra(85);
CFont* def_font = pDC->SelectObject(&font);
CRect r;
CString strName="1884-1922"; //does not print '-'
r.SetRect(200,-2000,8000,-3000);
pDC->DrawText(strName,r,DT_CENTER);
[...]
Do you have enough space for the text? For MM_HIMETRIC mode a
logical unit equals to 0.01 mm. You give 7800 logical units for
the text string, it is 78 mm. This is pretty much space, but
didn't say what the size of a font.
HTH
Alex
.
- Follow-Ups:
- Re: SetTextCharacterExtra
- From: TOB
- Re: SetTextCharacterExtra
- References:
- SetTextCharacterExtra
- From: TOB
- SetTextCharacterExtra
- Prev by Date: Re: header files in VC
- Next by Date: Re: msvcp90d.dll and msvcr90d.dll
- Previous by thread: SetTextCharacterExtra
- Next by thread: Re: SetTextCharacterExtra
- Index(es):