#Include Once "window9.bi"

Function SetImageGadget(ByVal gadget As Integer, ByVal imageID As HBITMAP) As Integer Export
	Dim fbgui77 As String = GetClassName_(GadgetID(gadget))
	If fbgui77="Button" Then
		Return SendMessage(GadgetID(gadget),BM_SETIMAGE, 0,Cast(LPARAM,imageId))
	ElseIf fbgui77="Static" Then
		Return SendMessage(GadgetID(gadget),STM_SETIMAGE, 0,Cast(LPARAM,imageId))
	EndIf
End Function
