Textwidth() and font positioning.

BlitzMax Forums/BlitzMax Beginners Area/Textwidth() and font positioning.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Well this is my attempt so far.

Extern "win32"
	Function GetActiveWindow()
	Function GetcharABCwidths(hdc,ifirstchr,ilastchr,lpbuffer:abc)
End Extern

Graphics 800, 600, 0

 
Type abc
	Field abcA:Int
	Field abcB:Int
	Field abcC:Int
End Type

hWnd:Int = GetActiveWindow()
hDC:Int = GetDC(hWnd)

result:abc=New abc
font:timagefont=LoadImageFont("steve.ttf",30)
SetImageFont(font)

num=GetCharABCwidths(hdc,32,32,result)


Which gives me this message
"C:/Work/My Programs/My Utilities/Animfonts/.bmx/getfontwidth.bmx.gui.debug.win32.o(code+0x19b): undefined reference to `GetcharABCwidths@16'"

The whole ABC concept I understand, A and C are the spaces before and after the font, B the actual width. Which I got from the MSDN page
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_448i.asp

So close but no cigar. Still stumped by it. I understand what it has to do, but not how to express it in Bmax.