#include once "window9.bi"

Sub HideGadget(ByVal iGadget As long, ByVal iState As long) Export
	dim as HWND hWin = gadgetid(iGadget)
	dim as Hwnd hExtWin = GetProp(hWin,"addparam60000")
    If win9GetGadgetClass(hExtWin)=14 Then
        ShowWindow(hExtWin, iif(iState,0,1))
    EndIf
	ShowWindow(hWin, iif(iState,0,1))
End Sub