Hi,
In a program of mine, i'm using the DrawText api to draw text. But.. i can only draw black text. I can draw colored text by setting the forecolor property, but i dont want to do that. Anyone knows how to do this?
Thanks in advance,
Shell
Printable View
Hi,
In a program of mine, i'm using the DrawText api to draw text. But.. i can only draw black text. I can draw colored text by setting the forecolor property, but i dont want to do that. Anyone knows how to do this?
Thanks in advance,
Shell
There is an API named setTextColor it needs the DC of the window you are drawing the text on. under is it's declaration
VB Code:
Public Declare Function SetTextColor Lib "gdi32" Alias "SetTextColor" (ByVal hdc As Long, ByVal crColor As Long) As Long
Call this API before calling DrawText
Argh!! It's that easy! Thanks :D