
03-31-2002, 02:10 PM
|
 |
Political Coder
Retired Moderator * Guru *
|
|
Join Date: Mar 2001
Location: London, England
Posts: 8,037
|
|
Here is a snippet from some DX code I have lying around:
Code:
Dim CurrentFontX As D3DXFont
Dim CurrentFont As New StdFont
Dim CurrentColor As Long
Dim FontDesc As IFont
With CurrentFont
.Name = FontName
.Size = FontSize
.Bold = True
.Italic = True
End With
Set FontDesc = CurrentFont
Set CurrentFontX = D3DX.CreateFont(Device, FontDesc.hFont)
CurrentColor = &HFF0000FF
Dim RecDest As RECT
With RecDest
.Top = 100
.Left = 100
.bottom = (CurrentFont.Size * 2) + 100
.Right = (CurrentFont.Size * Len("Hello World!") * 2) + 100
End With
D3DX.DrawText CurrentFontX, CurrentColor, "Hello World!", RecDest, DT_LEFT Or DT_TOP
I'm sure you can pick something useful out of that code. 
|
|