Register for your free account! | Forgot your password?

You last visited: Today at 15:21

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



help

Discussion on help within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2016
Posts: 1
Received Thanks: 0
help

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 ?
Omar677771 is offline  
Old 06/01/2016, 16:41   #2
dotCom
 
Devsome's Avatar
 
elite*gold: 9842
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 16,843
Received Thanks: 4,675
Hello @ please use next time a meaningful title instead of 'help'.

Update:
Next time you will get a warning.
Devsome is offline  
Old 06/04/2016, 15:50   #3
 
elite*gold: 8
Join Date: Sep 2014
Posts: 625
Received Thanks: 178
Hook the D3D EndScene.
qqdev is offline  
Reply




All times are GMT +1. The time now is 15:21.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.