DirectX9 ID3DXFont DrawText Problem.
- From: "jgkim999" <jgkim999@xxxxxxxxx>
- Date: 14 Sep 2005 04:04:47 -0700
My game using DirectX 9.
Code
------------------------------------------
HRESULT CD3DFontX::DrawText( FLOAT x, FLOAT y, DWORD dwColor, const
TCHAR* strText, DWORD dwFlags )
{
if( m_pd3dxFont && strText )
{
RECT rectText;
ZeroMemory ( &rectText, sizeof(RECT) );
rectText.left = (LONG)x;
rectText.top = (LONG)y;
//size_t nlen = wcslen(wszText);
size_t nlen = strlen(strText);
if ( nlen!=0 )
{
m_pd3dxFont->DrawTextA ( NULL, strText, nlen, &rectText,
DT_SINGLELINE|DT_EXPANDTABS|DT_CALCRECT, dwColor ); //DT_NOPREFIX
m_pd3dxFont->DrawTextA ( NULL, strText, nlen, &rectText,
DT_SINGLELINE|DT_EXPANDTABS|DT_NOCLIP, dwColor ); //DT_NOPREFIX
}
}
return S_OK;
}
------------------------------------------
This code work fine (english, japanese, traditional chinese).
But [codepage 874(Thailand) / character set(THAI_CHARSET)/
Font(Tahoma/CordiaUPC)] program crash at DrawTextA
DirectX 9 Sample (CustomUI) also crash when using font Tahoma or
CordiaUPC (Thai IME).
Have any solution?
--
Sorry for my poor english
.
- Prev by Date: Re: What does render target refer to ?
- Next by Date: Re: Including d3dx9_24.dll with shipping title
- Previous by thread: Backward compatible with MFC
- Next by thread: Re: Including d3dx9_24.dll with shipping title
- Index(es):
Relevant Pages
|