help

06/01/2016 14:07 Omar677771#1
hi, i need help me with this code:
Code:
enum COLOR {
Blue = 0xff0000ff,
Red = 0xffff0000,
Green = 0xff00ff00,
White = 0xffffffff,
Black = 0xff000000
};

void D3DText( int X, int Y, COLOR Color, char *Text, ... )
{
char TextBuff[1024];
ID3DXFont *Font;
RECT xy;

D3DXCreateFont( NULL, 20, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT("Arial"), &Font );

xy.left = X;
xy.top = Y;
xy.right = X + 1000;
xy.bottom = Y + 1000;

va_list va_alist;
va_start(va_alist, Text);
vsprintf(TextBuff, Text, va_alist);
va_end(va_alist);

Font->DrawTextA( NULL, TextBuff, -1, &xy, 0, Color );
}
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD dwAttached, LPVOID lpvReserved)
    {
  if (dwAttached == DLL_PROCESS_ATTACH)
		{    
	D3DText(10,20,Green,"Hello World!");
		}	
	}
any help:?
i wana draw 3d text in game!
should i add .lib or include or ?
06/01/2016 16:41 Devsome#2
Hello @[Only registered and activated users can see links. Click Here To Register...] please use next time a meaningful title instead of 'help'.

Update:
Next time you will get a warning.
06/04/2016 15:50 qqdev#3
Hook the D3D EndScene.