DirectX9 ID3DXFont DrawText Problem.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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

.



Relevant Pages

  • Dynamic formatting
    ... Is there a standard PM dialog available to adjust a number? ... name of the type of dialog in English, but I mean the one with a small up ... is there a way to specify the precision of a float? ... different results with REXX and C, and assume REXX is the winner. ...
    (comp.os.os2.programmer.misc)
  • Re: byte to int casting question
    ... Please write in English. ... Any time you do an addition the operands ... will be promoted to int or long or float or double as appropriate. ...
    (comp.lang.java.programmer)
  • Re: aproximate a number
    ... I'd need to aproximate a given float number into the next ... > bigger one. ... Because of my bad english I try to explain it with some example: ...
    (comp.lang.python)
  • Re: aproximate a number
    ... I'd need to aproximate a given float number into the next ... > bigger one. ... Because of my bad english I try to explain it with some ...
    (comp.lang.python)