#Include once "window9.bi"

Dim Shared As HFONT FONT___
Function SetGadgetFont(ByVal gadget As integer = -1 ,ByVal Font As integer=-1) as integer Export
	If gadget=-1 And font=-1 Then
		FONT___ =0
	ElseIf gadget=-1 Then
		FONT___ = Cast(HFONT,Font)
	Else
		If GetClassName_(GadgetID(gadget)) = "ExplorerGadget" Then
			Return SendMessage(GetProp(GadgetID(gadget),"EXPLORERGADGETLISTVIEWWINDOW"),WM_SETFONT,Cast(WPARAM,font),0)
		else
			Return SendMessage(GadgetID(gadget),WM_SETFONT,Cast(WPARAM,font),0)
		EndIf
	EndIf
End Function

Function GGF() As integer Export
	Return cast(integer,FONT___)
End Function
