#Include once "window9.bi"

Function OptionGadget Alias "OptionGadget" (ByVal gadget As Integer, ByVal x As Integer,ByVal y As Integer,ByVal Width_ As Integer,ByVal height_ As Integer,ByVal stri As String="",ByVal par As Integer=9	) As HWND Export
  Dim InitCtrlEx As INITCOMMONCONTROLSEX
  InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX)
  InitCtrlEx.dwICC  = ICC_STANDARD_CLASSES
  InitCommonControlsEx(@InitCtrlEx)
  Var hhh= CreateWindowEx( 0, "Button", stri, WS_VISIBLE Or WS_CHILD Or par, x, y, Width_, Height_, GETGURRENTAL(), Cast(HMENU,gadget), 0, 0)
  ADDIN9999 (gadget,hhh)
  ColorAdd(hhh,15790320,0)
  If GGF()<>0 Then
    SendMessage(hhh,WM_SETFONT,GGF(),0)
  EndIf
  Return hhh
End Function
