05-04-2008, 04:25 AM
In my journey to center text, I ran across a gdi32 api call dubbed GetTextExtentPoint which measures dimensions of specified text in hdc. The only problem is, I get a "User-Defined Type Not Defined" when adding the function:
Can't figure out why it won't recognise it. Help!!
Even better, if you have a operable center solution, pm me
Thanks in advance!
Code:
Public Declare Function GetTextExtentPoint Lib "gdi32" Alias "GetTextExtentPointA" (ByVal hDC As Integer, ByVal lpszString As String, ByVal cbString As Integer, ByRef lpSize As Size) As IntegerEven better, if you have a operable center solution, pm me

Thanks in advance!


