Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

DirectX8 DrawText RECT Type Mismatch


Kimimaru
 Share

Recommended Posts

Hey, everyone! I'm currently converting my game to use DirectX8, and I'm having some difficulty. I'm starting out with changing the way the Client draws out text, also known as Sub DrawText. I have everything set up well, but the only thing stopping me from testing out what I've done is a 'Type Mismatch' error in Sub DrawText. Here's my Sub:

```
Public Sub DrawText(ByVal x As Long, ByVal y As Long, ByVal Text As String, color As Long)
    Dim TextRect As RECT

    TextRect.Top = y
    TextRect.Bottom = TextRect.Top + 20
    TextRect.Left = x
    TextRect.Right = TextRect.Left + Len(Text) + 10
    Direct3DX.DrawText MainFont, D3DColorRGBA(255, 255, 255, 255), Text, TextRect, DT_TOP Or DT_CENTER
End Sub
```
It's giving me a type mismatch error on **TextRect** in the Direct3DX.DrawText statement. Any suggestions on why this is happening? Thanks in advance.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...