Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DrawText

Status
Not open for further replies.

lGOOODl

Programmer
Dec 4, 2001
31
DK
Hi,

How do I use the DrawText function? I thought it would be easy to use, but it wont work?

Here's the code I've used:

HDC hdc=GetDC(hwnd);

RECT lpRect;
lpRect.bottom = 300;
lpRect.left = 300;
lpRect.right = 100;
lpRect.top = 100;

DrawText(hdc,"THE TEXT",0,&lpRect,0);

Please Help Me!
-=<GOOOD>=-
 
You should try the following:
DrawText(hdc,&quot;THE TEXT&quot;,-1,&lpRect,DT_CENTER | DT_VCENTER);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top