Вот краткая функция вывода текста:
void InitMyText(IDirect3DDevice9* dev,HFONT hFont)
{
if (hFont == NULL)
hFont = CreateFont(30,10,0,0,FW_NORMAL,0,0,0,1,0,0,0,DEFAULT_PITCH | FF_MODERN,L"Arial");
if (pFont == NULL)
D3DXCreateFontIndirect(dev,&hv,&pFont);
}
void DrawMyText(LPCWSTR str,int x,int y,int x1,int y1,D3DCOLOR MyColor)
{
Rec.left = x;
Rec.top = y;
Rec.right = x1;
Rec.bottom = y1;
pFont -> DrawText(0,str,-1,&Rec,DT_WORDBREAK,MyColor);
}
Вопрос в том как только выводить цифры? Где-то читал что надо делать так:
void PrintInt(int a, int x, int y,D3DCOLOR MyColor)
{
char textint[33];
_itoa_s(a,textint,10);
pFont -> DrawText(0,textint,-1,&Rec,DT_WORDBREAK,MyColor); // Ругается
}
Ругается потому что не совпадает тип
char с типом
LPCWSTR.
Вот и не пойму что делать. Подскажите.