Image Width/Height?

BlitzMax Forums/BlitzMax GUI Programming/Image Width/Height?

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.

Hi, I am new to BlitzMax and I am using this code from the forums to create image buttons.
Does anyone know how I can get the image size of the loaded button image?

Function CreateImageButton:TGadget(imagefile:String, x, y, width, height, group:TGadget)
Extern "win32"
Function LoadImageA:Int (hInst%, lpsz$z, un1%, n1%, n2%, un2%)
Function SetWindowLongA:Int ( hWnd%, Val%, Lng% )
Function GetWindowLongA% ( hWnd%, Val% )
Function SendMessageA% ( hWnd%, Msg%, wParam%, lParam% )
End Extern

Const LR_LOADFROMFILE = 16
Const GWL_STYLE = -16
Const BS_BITMAP = 128
Const BM_SETIMAGE = 247
Const IMAGE_BITMAP = 0
Const IMAGE_ICON = 1

Local i = LoadImageA( 0, imagefile$, IMAGE_BITMAP, 0,0, LR_LOADFROMFILE )
If Not i Then Notify imagefile + " not found.", True ; End
Local button:TGadget = CreateButton("", x, y, width, height, group)
Local hbutton = QueryGadget( button, QUERY_HWND_CLIENT )
Local flags = GetWindowLongA( hbutton, GWL_STYLE ) + BS_BITMAP
SetWindowLongA hbutton, GWL_STYLE,flags
SendMessageA hbutton, BM_SETIMAGE, IMAGE_BITMAP, i

Return button
End Function