Global $ProGUI
If @AutoItX64 = 1 Then
   $ProGUI = DllOpen(@ScriptDir&"\ProGUI64.dll")
Else
   $ProGUI = DllOpen(@ScriptDir&"\ProGUI.dll")
EndIf
If $ProGUI = -1 Then
   Msgbox(0,'Error', 'Could not open ProGUI.dll/ProGUI64.dll')
   Exit
EndIf

Const $ProGUI_Any = -1
Const $RBBS_SIZEABLE = 0x60000
Const $RBBS_VERTICALRESIZEABLE = 0x800000
Const $REBAR_UPDATED = 35155
Const $TBSTYLE_BUTTON = 0x0
Const $TBSTYLE_SEP = 0x1
Const $TBSTYLE_CHECK = 0x2
Const $TBSTYLE_GROUP = 0x4
Const $TBSTYLE_CHECKGROUP = 0x6
Const $TBSTYLE_DROPDOWN = 0x8
Const $TBSTYLE_AUTOSIZE = 0x10
Const $TBSTYLE_NOPREFIX = 0x20
Const $TBSTYLE_TOOLTIPS = 0x100
Const $TBSTYLE_WRAPABLE = 0x200
Const $TBSTYLE_ALTDRAG = 0x400
Const $TBSTYLE_FLAT = 0x800
Const $TBSTYLE_LIST = 0x1000
Const $TBSTYLE_CUSTOMERASE = 0x2000
Const $TBSTYLE_REGISTERDROP = 0x4000
Const $TBSTYLE_TRANSPARENT = 0x8000
Const $TBSTYLE_HIDECLIPPEDBUTTONS = 0x800000
Const $TBSTYLE_EX_DRAWDDARROWS = 0x1
Const $TBSTYLE_EX_UNDOC1 = 0x4
Const $TBSTYLE_EX_MIXEDBUTTONS = 0x8
Const $TBSTYLE_EX_HIDECLIPPEDBUTTONS = 0x10
Const $TBSTYLE_EX_DOUBLEBUFFER = 0x80
Const $BTNS_BUTTON = 0x0
Const $BTNS_SEP = 0x1
Const $BTNS_CHECK = 0x2
Const $BTNS_GROUP = 0x4
Const $BTNS_CHECKGROUP = 0x6
Const $BTNS_DROPDOWN = 0x8
Const $BTNS_AUTOSIZE = 0x10
Const $BTNS_NOPREFIX = 0x20
Const $BTNS_SHOWTEXT = 0x40
Const $BTNS_WHOLEDROPDOWN = 0x80
Const $RBBS_USECHEVRON = 0x00000200
Const $ItemEx_ShowCheckbox = 1
Const $ItemEx_ShowRadiocheck = 2
Const $ItemEx_UseIcon = 0x1000
Const $ItemEx_EndRadiocheckGroup = 0x10000
Const $SKIN_SAVE_PACKAGE = 0x1
Const $RBS_VARHEIGHT = 0x200
Const $RBBS_BREAK = 0x1
Const $RBBS_CHILDEDGE = 0x4
Const $RBBS_GRIPPERALWAYS = 0x80
Const $RBBS_NOGRIPPER = 0x100
Const $RBBS_FIXEDSIZE = 0x2
Const $RBS_BANDBORDERS = 0x400
Const $CMDBAR_TOP = 0x0
Const $CMDBAR_BOTTOM = 0x1
Const $CMDBAR_LEFT = 0x2
Const $CMDBAR_RIGHT = 0x4
Const $CMDBAR_NEWLINE = 0x1
Const $CMDBAR_CHILDMARGIN = 0x2
Const $TCX_TRANSPARENT = 0x70000
Const $TCX_BK_FILL = 0x1000
Const $TCX_BK_GRADIENT = 0x2000
Const $TCX_CENTRE = 0x10
Const $TCX_RIGHT = 0x40
Const $TCX_TOP = 0x1
Const $TCX_VCENTRE = 0x20
Const $TCX_END_ELLIPSIS = 0x8000
Const $TCX_PATH_ELLIPSIS = 0x4000
Const $TCX_DISABLE_ESCAPECODES = 0x200000
Const $TCX_IGNORE_COLOR_ESCAPECODE = 0x400000
Const $TCX_LINK_HOVER = 34175
Const $TCX_LINK_CLICK = 34176
Const $PNLX_CENTRE = 0x10
Const $PNLX_VCENTRE = 0x20
Const $PNLX_HPERCENT = 0x1
Const $PNLX_VPERCENT = 0x2
Const $PNLX_PERCENT = 0x3
Const $PNLX_NOCLIP = 0x4
Const $PNLX_STRETCH = 0x80
Const $PNLX_HREPEAT = 0x100
Const $PNLX_VREPEAT = 0x200
Const $PNLX_RIGHT = 0x400
Const $PNLX_BOTTOM = 0x800
Const $PNLX_TILE = 0x300
Const $PNLX_MASKED = 0x1000
Const $PNLX_OVERLAY = 0x2000
Const $PNLX_STATIC = 0x4000
Const $PNLX_IGNORE = -0xFFFFFFF
Const $PNLX_HSCROLL = 0x10
Const $PNLX_VSCROLL = 0x20
Const $PNLX_SCROLLBARS = 0x30
Const $PNLX_AUTOSCROLL = 0x40
Const $PNLX_SCROLLBARS_OUTSIDE = 0x80
Const $PNLX_HSCROLLHANDLE = 0x100
Const $PNLX_VSCROLLHANDLE = 0x200
Const $PNLX_AUTOSCROLL_NOHORIZONTAL = 0x400
Const $PNLX_AUTOSCROLL_NOVERTICAL = 0x800
Const $UISTYLE_BUTTON = 0
Const $UISTYLE_EXPLORER = 1
Const $UISTYLE_MOZILLA = 2
Const $UISTYLE_BEVELED_A = 3
Const $UISTYLE_BEVELED_B = 4
Const $UISTYLE_WHIDBEY = 5
Const $UISTYLE_OFFICE2003 = 0x1000000
Const $UISTYLE_OFFICE2007 = 0x2000000
Const $UISTYLE_IMAGE = 0x4000000
Const $menuTitleTextColor = 0
Const $menuTitleHotTextColor = 1
Const $menuTitleHeldTextColor = 2
Const $menuTitleInactiveTextColor = 3
Const $menuTextColor = 4
Const $menuHotColor = 5
Const $menuHotGradientColor1 = 6
Const $menuHotGradientColor2 = 7
Const $menuHotBorder = 8
Const $menuHeldColor = 9
Const $menuHeldGradientColor1 = 10
Const $menuHeldGradientColor2 = 11
Const $menuHeldBorder = 12
Const $menuBarColor = 13
Const $menuCheckboxBackground = 14
Const $menuCheckboxBorder = 15
Const $menuCheckboxSelectedBackground = 16
Const $menuCheckboxSelectedBorder = 17
Const $menuCheckboxDisabledBackground = 18
Const $menuCheckboxDisabledBorder = 19
Const $menuDropShadow = 20
Const $barGradientColor1 = 21
Const $barGradientColor2 = 22
Const $barGradientColor3 = 23
Const $barGradientColor4 = 24
Const $separatorBar = 25
Const $selectedColor = 26
Const $selectedTextColor = 27
Const $selectedBorder = 28
Const $disabledColor = 29
Const $background = 30
Const $rebarBackground1 = 31
Const $rebarBackground2 = 32
Const $toolstripBackground1 = 33
Const $toolstripBackground2 = 34
Const $toolstripBackground3 = 35
Const $toolstripBackground4 = 36
Const $toolstripDropdownGradient1 = 37
Const $toolstripDropdownGradient2 = 38
Const $toolstripDropdownGradient3 = 39
Const $toolstripDropdownGradient4 = 40
Const $toolstripShadow = 41
Const $gripperSolid = 42
Const $gripperShadow = 43
Const $SelectGradientColor1 = 44
Const $SelectGradientColor2 = 45
Const $StickySelectGradientColor1 = 46
Const $StickySelectGradientColor2 = 47
Const $StickySelectBorderColor = 48
Const $toolbarButtonTextColor = 49
Const $toolbarButtonHotTextColor = 50
Const $toolbarButtonDisabledTextColor = 51
Const $toolbarHotGradientColor1 = 52
Const $toolbarHotGradientColor2 = 53
Const $toolbarSeparator = 54
Const $toolbarSeparatorShadow = 55
Const $MaxUIComponents = 56
Const $UICOLOURMODE_DEFAULT = 0
Const $UICOLOURMODE_DEFAULT_BLUE = 1
Const $UICOLOURMODE_DEFAULT_OLIVE = 2
Const $UICOLOURMODE_DEFAULT_SILVER = 3
Const $UICOLOURMODE_DEFAULT_GREY = 4
Const $UICOLOURMODE_CUSTOM = 5
Const $UICOLOURMODE_CUSTOM_BLUE = 6
Const $UICOLOURMODE_CUSTOM_OLIVE = 7
Const $UICOLOURMODE_CUSTOM_SILVER = 8
Const $UICOLOURMODE_CUSTOM_GREY = 9
Const $Img_ReturnIcon = 0x2
Const $ImgBlend_Greyscale = 0x1
Const $ImgBlend_ReturnIcon = 0x2
Const $ImgBlend_DestroyOriginal = 0x4
Const $Font_Bold = 0x1
Const $Font_Italic = 0x2
Const $Font_Underline = 0x4
Const $Font_StrikeOut = 0x8
Const $Font_Antialiased = 0x10000
Const $Font_NonAntialiased = 0x20000
Const $Font_Cleartype = 0x40000
Const $Font_Draft = 0x80000
Const $Window_Minimize = 0xCA0000
Const $Window_Maximize = 0xC90000
Const $Window_Size = 0xC40000
Const $Window_Invisible = 0x10000000
Const $Window_TitleBar = 0xC00000
Const $Window_Tool = 0x4
Const $Window_BorderLess = 0x80000000
Const $Window_ScreenCentered = 0x1
Const $Window_WindowCentered = 0x2
Const $Window_OpenMaximized = 0x1000000
Const $Window_OpenMinimized = 0x20000000
Const $BUTTONEX_STICKYSKIN = 1
Const $SPLITTEREX_VERTICAL = 0x1
Const $SPLITTEREX_FIRSTMINIMUMSIZE = 0x2
Const $SPLITTEREX_FIRSTMAXIMUMSIZE = 0x4
Const $SPLITTEREX_SECONDMINIMUMSIZE = 0x8
Const $SPLITTEREX_SECONDMAXIMUMSIZE = 0x10
Const $SPLITTEREX_FIRST = 0x20
Const $SPLITTEREX_SECOND = 0x40
Const $SPLITTEREX_HIDEFIRST = 0x80
Const $SPLITTEREX_HIDESECOND = 0x100
Const $SPLITTEREX_POSITION = 0x200
Const $SPLITTEREX_ANCHORSIZETO = 0x400
Const $SPLITTEREX_ANCHORPOSITION = 0x800
Const $SPLITTEREX_ANCHOR = 0x1000
Const $SPLITTEREX_DEFAULTSKIN = 0
Const $SPLITTEREX_DEFAULTSKIN2 = 1
Const $SPLITTEREX_ANCHOREDTOP = 0x10000
Const $SPLITTEREX_ANCHOREDLEFT = 0x20000
Const $SPLITTEREX_ANCHOREDBOTTOM = 0x40000
Const $SPLITTEREX_ANCHOREDRIGHT = 0x80000
Const $SPLITTEREX_MOUSEHOVER = 36155
Const $SPLITTEREX_MOUSEDOWN = 36156
Const $SPLITTEREX_MOUSEUP = 36157
Const $VerticalGRADIENT = 1
Const $RectangleGRADIENT = 2
Const $EllipseGRADIENT = 3

Func LWord($Long) ; Returns the low-order word from a 32-bit number.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "LWord", "long", $Long)
   Else
      $result = DllCall($ProGUI, "int", "LWord", "long", $Long)
   EndIf
   Return $result[0]
EndFunc

Func HWord($Long) ; Returns the high-order word from a 32-bit number.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "HWord", "long", $Long)
   Else
      $result = DllCall($ProGUI, "int", "HWord", "long", $Long)
   EndIf
   Return $result[0]
EndFunc

Func MakeRGB($Red, $Green, $Blue)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "MakeRGB", "INT64", $Red, "INT64", $Green, "INT64", $Blue)
   Else
      $result = DllCall($ProGUI, "int", "MakeRGB", "int", $Red, "int", $Green, "int", $Blue)
   EndIf
   Return $result[0]
EndFunc

Func MakeColor($a, $r, $g, $b) ; Creates a Windows API compatible 32bit color value with alpha channel.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "long", "MakeColor", "long", $a, "long", $r, "long", $g, "long", $b)
   Else
      $result = DllCall($ProGUI, "long", "MakeColor", "long", $a, "long", $r, "long", $g, "long", $b)
   EndIf
   Return $result[0]
EndFunc

Func MakeColour($a, $r, $g, $b) ; Creates a Windows API compatible 32bit colour value with alpha channel.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "long", "MakeColour", "long", $a, "long", $r, "long", $g, "long", $b)
   Else
      $result = DllCall($ProGUI, "long", "MakeColour", "long", $a, "long", $r, "long", $g, "long", $b)
   EndIf
   Return $result[0]
EndFunc

Func AlphaBlendColour($lColor, $RColor, $Alpha) ; Returns 32bit colour value mixed with LColor + (RColour * Alpha)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "long", "AlphaBlendColour", "long", $lColor, "long", $RColor, "long", $Alpha)
   Else
      $result = DllCall($ProGUI, "long", "AlphaBlendColour", "long", $lColor, "long", $RColor, "long", $Alpha)
   EndIf
   Return $result[0]
EndFunc

Func AlphaBlendColor($lColor, $RColor, $Alpha) ; Returns 32bit color value mixed with LColor + (RColour * Alpha)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "long", "AlphaBlendColor", "long", $lColor, "long", $RColor, "long", $Alpha)
   Else
      $result = DllCall($ProGUI, "long", "AlphaBlendColor", "long", $lColor, "long", $RColor, "long", $Alpha)
   EndIf
   Return $result[0]
EndFunc

Func ProGUI_Init()
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ProGUI_Init")
   Else
      $result = DllCall($ProGUI, "int", "ProGUI_Init")
   EndIf
   Return $result[0]
EndFunc

Func StartProGUI($user, $k1, $k2, $k3, $k4, $k5, $k6, $k7)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "StartProGUI", "wstr", $user, "long", $k1, "long", $k2, "long", $k3, "long", $k4, "long", $k5, "long", $k6, "long", $k7)
   Else
      $result = DllCall($ProGUI, "int", "StartProGUI", "wstr", $user, "long", $k1, "long", $k2, "long", $k3, "long", $k4, "long", $k5, "long", $k6, "long", $k7)
   EndIf
   Return $result[0]
EndFunc

Func OpenWindowEx($Title, $x, $y, $InnerWidth, $InnerHeight, $Flags, $Skin, $ParentHwnd) ; Creates a new window
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "OpenWindowEx", "wstr", $Title, "INT64", $x, "INT64", $y, "INT64", $InnerWidth, "INT64", $InnerHeight, "INT64", $Flags, "INT64", $Skin, "INT64", $ParentHwnd)
   Else
      $result = DllCall($ProGUI, "int", "OpenWindowEx", "wstr", $Title, "int", $x, "int", $y, "int", $InnerWidth, "int", $InnerHeight, "int", $Flags, "int", $Skin, "int", $ParentHwnd)
   EndIf
   Return $result[0]
EndFunc

Func LimitWindowSize($WindowID, $MinWidth, $MinHeight, $MaxWidth, $MaxHeight) ; sets the minimum and maximum dimensions that a window (HWND) can be resized to.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "LimitWindowSize", "INT64", $WindowID, "long", $MinWidth, "long", $MinHeight, "long", $MaxWidth, "long", $MaxHeight)
   Else
      $result = DllCall($ProGUI, "int", "LimitWindowSize", "int", $WindowID, "long", $MinWidth, "long", $MinHeight, "long", $MaxWidth, "long", $MaxHeight)
   EndIf
   Return $result[0]
EndFunc

Func HotKey($WindowID, $ID, $key) ; sets a keyboard accelerator/shortcut combination specified by key$ to a window. ID = -1 to remove shortcut, Key$ = "" to clear all.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "HotKey", "INT64", $WindowID, "INT64", $ID, "wstr", $key)
   Else
      $result = DllCall($ProGUI, "int", "HotKey", "int", $WindowID, "int", $ID, "wstr", $key)
   EndIf
   Return $result[0]
EndFunc

Func ImgPath($Path)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ImgPath", "wstr", $Path)
   Else
      $result = DllCall($ProGUI, "int", "ImgPath", "wstr", $Path)
   EndIf
   Return $result[0]
EndFunc

Func LoadImg($Path, $Width, $Height, $Flags) ; Loads a PNG, JPG, BMP or Icon, returns the new HBITMAP/HICON handle or zero for failure.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "LoadImg", "wstr", $Path, "long", $Width, "long", $Height, "INT64", $Flags)
   Else
      $result = DllCall($ProGUI, "int", "LoadImg", "wstr", $Path, "long", $Width, "long", $Height, "int", $Flags)
   EndIf
   Return $result[0]
EndFunc

Func ImgWidth($Image)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ImgWidth", "INT64", $Image)
   Else
      $result = DllCall($ProGUI, "int", "ImgWidth", "int", $Image)
   EndIf
   Return $result[0]
EndFunc

Func ImgHeight($Image)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ImgHeight", "INT64", $Image)
   Else
      $result = DllCall($ProGUI, "int", "ImgHeight", "int", $Image)
   EndIf
   Return $result[0]
EndFunc

Func FreeImg($Image) ; Removes an image or icon from memory.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreeImg", "INT64", $Image)
   Else
      $result = DllCall($ProGUI, "int", "FreeImg", "int", $Image)
   EndIf
   Return $result[0]
EndFunc

Func ImgBlend($Image, $AlphaChannel, $Contrast, $Brightness, $Color, $BlendAmount, $Flags) ; Alters an icon/image's alpha/contrast/brightness and/or blends with a color, returns new bitmap or icon
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ImgBlend", "INT64", $Image, "float", $AlphaChannel, "float", $Contrast, "float", $Brightness, "long", $Color, "float", $BlendAmount, "INT64", $Flags)
   Else
      $result = DllCall($ProGUI, "int", "ImgBlend", "int", $Image, "float", $AlphaChannel, "float", $Contrast, "float", $Brightness, "long", $Color, "float", $BlendAmount, "int", $Flags)
   EndIf
   Return $result[0]
EndFunc

Func ImgHueBlend($Image, $AlphaChannel, $HueColor, $Saturation, $Lightness, $BlendColor, $BlendAmount, $Flags) ; Alters an icon/image's alpha/color hue and/or blends with a color, returns new bitmap or icon
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ImgHueBlend", "INT64", $Image, "float", $AlphaChannel, "long", $HueColor, "float", $Saturation, "float", $Lightness, "long", $BlendColor, "float", $BlendAmount, "INT64", $Flags)
   Else
      $result = DllCall($ProGUI, "int", "ImgHueBlend", "int", $Image, "float", $AlphaChannel, "long", $HueColor, "float", $Saturation, "float", $Lightness, "long", $BlendColor, "float", $BlendAmount, "int", $Flags)
   EndIf
   Return $result[0]
EndFunc

Func ProGUIVersion()
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "float", "ProGUIVersion")
   Else
      $result = DllCall($ProGUI, "float", "ProGUIVersion")
   EndIf
   Return $result[0]
EndFunc

Func ProGUI_End()
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ProGUI_End")
   Else
      $result = DllCall($ProGUI, "int", "ProGUI_End")
   EndIf
   Return $result[0]
EndFunc

Func SetUIColourMode($mode)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetUIColourMode", "long", $mode)
   Else
      $result = DllCall($ProGUI, "int", "SetUIColourMode", "long", $mode)
   EndIf
   Return $result[0]
EndFunc

Func GetUIColourMode() ; Returns the current user interface colour mode
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetUIColourMode")
   Else
      $result = DllCall($ProGUI, "int", "GetUIColourMode")
   EndIf
   Return $result[0]
EndFunc

Func GetCurrentColourScheme() ; Returns the current active colour scheme
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetCurrentColourScheme")
   Else
      $result = DllCall($ProGUI, "int", "GetCurrentColourScheme")
   EndIf
   Return $result[0]
EndFunc

Func GetUIColour($style, $component, $colourScheme) ; returns the colour of a UI style component
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetUIColour", "long", $style, "long", $component, "long", $colourScheme)
   Else
      $result = DllCall($ProGUI, "int", "GetUIColour", "long", $style, "long", $component, "long", $colourScheme)
   EndIf
   Return $result[0]
EndFunc

Func SetUIColour($style, $component, $colour, $colourScheme, $noUpdate) ; sets the colour of a UI style component
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetUIColour", "long", $style, "long", $component, "long", $colour, "long", $colourScheme, "INT64", $noUpdate)
   Else
      $result = DllCall($ProGUI, "int", "SetUIColour", "long", $style, "long", $component, "long", $colour, "long", $colourScheme, "int", $noUpdate)
   EndIf
   Return $result[0]
EndFunc

Func LoadFontEx($Name, $PointSize, $Flags) ; loads a font and returns a handle to it
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "LoadFontEx", "wstr", $Name, "long", $PointSize, "INT64", $Flags)
   Else
      $result = DllCall($ProGUI, "int", "LoadFontEx", "wstr", $Name, "long", $PointSize, "int", $Flags)
   EndIf
   Return $result[0]
EndFunc

Func FreeFontEx($Font) ; Removes a font from memory
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreeFontEx", "INT64", $Font)
   Else
      $result = DllCall($ProGUI, "int", "FreeFontEx", "int", $Font)
   EndIf
   Return $result[0]
EndFunc

Func SetWindowFont($Hwnd, $Font)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetWindowFont", "INT64", $Hwnd, "INT64", $Font)
   Else
      $result = DllCall($ProGUI, "int", "SetWindowFont", "int", $Hwnd, "int", $Font)
   EndIf
   Return $result[0]
EndFunc

Func GetFontSize($fontID) ; returns the point size of a font
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetFontSize", "INT64", $fontID)
   Else
      $result = DllCall($ProGUI, "int", "GetFontSize", "int", $fontID)
   EndIf
   Return $result[0]
EndFunc

Func GetFontName($fontID) ; returns the face name of a font
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "wstr", "GetFontName", "INT64", $fontID)
   Else
      $result = DllCall($ProGUI, "wstr", "GetFontName", "int", $fontID)
   EndIf
   Return $result[0]
EndFunc

Func createScrollbarBox($Window, $x, $y, $visible)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "createScrollbarBox", "INT64", $Window, "long", $x, "long", $y, "long", $visible)
   Else
      $result = DllCall($ProGUI, "int", "createScrollbarBox", "int", $Window, "long", $x, "long", $y, "long", $visible)
   EndIf
   Return $result[0]
EndFunc

Func CreatePanelEx($PanelID, $parent, $x, $y, $width, $height, $usercallback)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CreatePanelEx", "long", $PanelID, "INT64", $parent, "long", $x, "long", $y, "long", $width, "long", $height, "INT64", $usercallback)
   Else
      $result = DllCall($ProGUI, "int", "CreatePanelEx", "long", $PanelID, "int", $parent, "long", $x, "long", $y, "long", $width, "long", $height, "int", $usercallback)
   EndIf
   Return $result[0]
EndFunc

Func AddPanelExPage($background)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "AddPanelExPage", "INT64", $background)
   Else
      $result = DllCall($ProGUI, "int", "AddPanelExPage", "int", $background)
   EndIf
   Return $result[0]
EndFunc

Func AddPanelExImagePage($background, $backgroundImg, $imageX, $imageY, $imageWidth, $imageHeight, $style)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "AddPanelExImagePage", "INT64", $background, "INT64", $backgroundImg, "long", $imageX, "long", $imageY, "long", $imageWidth, "long", $imageHeight, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "AddPanelExImagePage", "int", $background, "int", $backgroundImg, "long", $imageX, "long", $imageY, "long", $imageWidth, "long", $imageHeight, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func InsertPanelExPage($Panel, $page, $background) ; Inserts a PanelEx page into a PanelEx.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "InsertPanelExPage", "INT64", $Panel, "INT64", $page, "INT64", $background)
   Else
      $result = DllCall($ProGUI, "int", "InsertPanelExPage", "int", $Panel, "int", $page, "int", $background)
   EndIf
   Return $result[0]
EndFunc

Func InsertPanelExImagePage($Panel, $page, $background, $backgroundImg, $imageX, $imageY, $imageWidth, $imageHeight, $style) ; Inserts a PanelEx image page into a PanelEx.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "InsertPanelExImagePage", "INT64", $Panel, "INT64", $page, "INT64", $background, "INT64", $backgroundImg, "long", $imageX, "long", $imageY, "long", $imageWidth, "long", $imageHeight, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "InsertPanelExImagePage", "int", $Panel, "int", $page, "int", $background, "int", $backgroundImg, "long", $imageX, "long", $imageY, "long", $imageWidth, "long", $imageHeight, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func SetPanelExPageBorder($Panel, $index, $BorderImage, $BorderMask, $BorderRect, $noRefresh) ; Sets a PanelEx's page border.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetPanelExPageBorder", "INT64", $Panel, "INT64", $index, "INT64", $BorderImage, "INT64", $BorderMask, "INT64", $BorderRect, "INT64", $noRefresh)
   Else
      $result = DllCall($ProGUI, "int", "SetPanelExPageBorder", "int", $Panel, "int", $index, "int", $BorderImage, "int", $BorderMask, "int", $BorderRect, "int", $noRefresh)
   EndIf
   Return $result[0]
EndFunc

Func SetPanelExPageBackground($Panel, $page, $background, $backgroundImg, $imageX, $imageY, $imageWidth, $imageHeight, $style, $noRefresh) ; Sets a PanelEx's page background.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetPanelExPageBackground", "INT64", $Panel, "INT64", $page, "INT64", $background, "INT64", $backgroundImg, "long", $imageX, "long", $imageY, "long", $imageWidth, "long", $imageHeight, "long", $style, "INT64", $noRefresh)
   Else
      $result = DllCall($ProGUI, "int", "SetPanelExPageBackground", "int", $Panel, "int", $page, "int", $background, "int", $backgroundImg, "long", $imageX, "long", $imageY, "long", $imageWidth, "long", $imageHeight, "long", $style, "int", $noRefresh)
   EndIf
   Return $result[0]
EndFunc

Func SetPanelExPageAlpha($Panel, $Page, $Alpha, $noRefresh) ; Sets a PanelEx page's alpha transparency, 0 = fully transparent, 255 = opaque.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetPanelExPageAlpha", "INT64", $Panel, "INT64", $Page, "INT64", $Alpha, "INT64", $noRefresh)
   Else
      $result = DllCall($ProGUI, "int", "SetPanelExPageAlpha", "int", $Panel, "int", $Page, "int", $Alpha, "int", $noRefresh)
   EndIf
   Return $result[0]
EndFunc

Func RefreshPanelEx($Panel)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "RefreshPanelEx", "INT64", $Panel)
   Else
      $result = DllCall($ProGUI, "int", "RefreshPanelEx", "int", $Panel)
   EndIf
   Return $result[0]
EndFunc

Func SetPanelExPageScrolling($Panel, $index, $flags, $Value) ; Sets a PanelEx's page scrolling properties
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetPanelExPageScrolling", "INT64", $Panel, "INT64", $index, "long", $flags, "long", $Value)
   Else
      $result = DllCall($ProGUI, "int", "SetPanelExPageScrolling", "int", $Panel, "int", $index, "long", $flags, "long", $Value)
   EndIf
   Return $result[0]
EndFunc

Func GetPanelExPageScrolling($Panel, $index, $flag) ; Returns a PanelEx page's scrolling property value specified by flag.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetPanelExPageScrolling", "INT64", $Panel, "INT64", $index, "long", $flag)
   Else
      $result = DllCall($ProGUI, "int", "GetPanelExPageScrolling", "int", $Panel, "int", $index, "long", $flag)
   EndIf
   Return $result[0]
EndFunc

Func SetPanelExPageCursor($Panel, $index, $Cursor) ; Sets a PanelEx page's mouse cursor
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetPanelExPageCursor", "INT64", $Panel, "INT64", $index, "INT64", $Cursor)
   Else
      $result = DllCall($ProGUI, "int", "SetPanelExPageCursor", "int", $Panel, "int", $index, "int", $Cursor)
   EndIf
   Return $result[0]
EndFunc

Func ShowPanelExPage($Panel, $index)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ShowPanelExPage", "INT64", $Panel, "INT64", $index)
   Else
      $result = DllCall($ProGUI, "int", "ShowPanelExPage", "int", $Panel, "int", $index)
   EndIf
   Return $result[0]
EndFunc

Func PanelExID($Panel, $index) ; returns the HWND of a PanelEx Page or if index = -1, the PanelEx HWND
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "PanelExID", "INT64", $Panel, "INT64", $index)
   Else
      $result = DllCall($ProGUI, "int", "PanelExID", "int", $Panel, "int", $index)
   EndIf
   Return $result[0]
EndFunc

Func PanelExPageIndex($Panel)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "PanelExPageIndex", "INT64", $Panel)
   Else
      $result = DllCall($ProGUI, "int", "PanelExPageIndex", "int", $Panel)
   EndIf
   Return $result[0]
EndFunc

Func FreePanelEx($id) ; Frees a PanelEx from memory.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreePanelEx", "INT64", $id)
   Else
      $result = DllCall($ProGUI, "int", "FreePanelEx", "int", $id)
   EndIf
   Return $result[0]
EndFunc

Func FreePanelExPage($id, $index) ; Removes a PanelExPage from PanelEx.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreePanelExPage", "INT64", $id, "long", $index)
   Else
      $result = DllCall($ProGUI, "int", "FreePanelExPage", "int", $id, "long", $index)
   EndIf
   Return $result[0]
EndFunc

Func PanelExWidth($Panel) ; Returns width of PanelEx in pixels
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "PanelExWidth", "INT64", $Panel)
   Else
      $result = DllCall($ProGUI, "int", "PanelExWidth", "int", $Panel)
   EndIf
   Return $result[0]
EndFunc

Func PanelExHeight($Panel) ; Returns height of PanelEx in pixels
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "PanelExHeight", "INT64", $Panel)
   Else
      $result = DllCall($ProGUI, "int", "PanelExHeight", "int", $Panel)
   EndIf
   Return $result[0]
EndFunc

Func GetDefaultGlobalSkinColourTheme() ; Gets the default detected global colour theme name
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "wstr", "GetDefaultGlobalSkinColourTheme")
   Else
      $result = DllCall($ProGUI, "wstr", "GetDefaultGlobalSkinColourTheme")
   EndIf
   Return $result[0]
EndFunc

Func SetGlobalSkinColourTheme($Name) ; Sets the global colour theme name that all the skins will use if supported
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetGlobalSkinColourTheme", "wstr", $Name)
   Else
      $result = DllCall($ProGUI, "int", "SetGlobalSkinColourTheme", "wstr", $Name)
   EndIf
   Return $result[0]
EndFunc

Func GetGlobalSkinColourTheme() ; Gets the current global colour theme name
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "wstr", "GetGlobalSkinColourTheme")
   Else
      $result = DllCall($ProGUI, "wstr", "GetGlobalSkinColourTheme")
   EndIf
   Return $result[0]
EndFunc

Func SetSkinPath($Path) ; Sets the file path of where skins/resources are automatically looked for
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetSkinPath", "wstr", $Path)
   Else
      $result = DllCall($ProGUI, "int", "SetSkinPath", "wstr", $Path)
   EndIf
   Return $result[0]
EndFunc

Func LoadSkin($Path) ; Loads and returns handle to a skin
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "LoadSkin", "wstr", $Path)
   Else
      $result = DllCall($ProGUI, "int", "LoadSkin", "wstr", $Path)
   EndIf
   Return $result[0]
EndFunc

Func SaveSkin($Skin, $Path, $Flags) ; Saves a skin
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SaveSkin", "INT64", $Skin, "wstr", $Path, "INT64", $Flags)
   Else
      $result = DllCall($ProGUI, "int", "SaveSkin", "int", $Skin, "wstr", $Path, "int", $Flags)
   EndIf
   Return $result[0]
EndFunc

Func CreateSkin($Name) ; Creates a skin
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CreateSkin", "wstr", $Name)
   Else
      $result = DllCall($ProGUI, "int", "CreateSkin", "wstr", $Name)
   EndIf
   Return $result[0]
EndFunc

Func GetSkinName($Skin) ; Returns the name of a skin.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "wstr", "GetSkinName", "INT64", $Skin)
   Else
      $result = DllCall($ProGUI, "wstr", "GetSkinName", "int", $Skin)
   EndIf
   Return $result[0]
EndFunc

Func GetSkinHandle($Name) ; Returns the handle of a created/loaded Skin by name.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetSkinHandle", "wstr", $Name)
   Else
      $result = DllCall($ProGUI, "int", "GetSkinHandle", "wstr", $Name)
   EndIf
   Return $result[0]
EndFunc

Func SetSkinProperty($Skin, $Component, $State, $Property, $Value) ; Sets a skin's property
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetSkinProperty", "INT64", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "wstr", $Value)
   Else
      $result = DllCall($ProGUI, "int", "SetSkinProperty", "int", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "wstr", $Value)
   EndIf
   Return $result[0]
EndFunc

Func GetSkinProperty($Skin, $Component, $State, $Property) ; Gets a skin's property
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "wstr", "GetSkinProperty", "INT64", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property)
   Else
      $result = DllCall($ProGUI, "wstr", "GetSkinProperty", "int", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property)
   EndIf
   Return $result[0]
EndFunc

Func GetSkinPropertyParam($skin, $Component, $State, $Property, $Parameter) ; Returns a skin property parameter value
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "wstr", "GetSkinPropertyParam", "INT64", $skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "wstr", $Parameter)
   Else
      $result = DllCall($ProGUI, "wstr", "GetSkinPropertyParam", "int", $skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "wstr", $Parameter)
   EndIf
   Return $result[0]
EndFunc

Func GetSkinPropertySubParam($Skin, $Component, $State, $Property, $Parameter, $Index) ; Returns a skin property parameter's comma separated sub value
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "wstr", "GetSkinPropertySubParam", "INT64", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "wstr", $Parameter, "INT64", $Index)
   Else
      $result = DllCall($ProGUI, "wstr", "GetSkinPropertySubParam", "int", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "wstr", $Parameter, "int", $Index)
   EndIf
   Return $result[0]
EndFunc

Func CountSkinPropertySubParams($Skin, $Component, $State, $Property, $Parameter) ; Returns number of skin property parameter's comma separated sub values
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CountSkinPropertySubParams", "INT64", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "wstr", $Parameter)
   Else
      $result = DllCall($ProGUI, "int", "CountSkinPropertySubParams", "int", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "wstr", $Parameter)
   EndIf
   Return $result[0]
EndFunc

Func GetSkinPropertyColour($Skin, $Component, $State, $Property) ; if skin's property is a colour then returns numerical colour value else -1
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetSkinPropertyColour", "INT64", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property)
   Else
      $result = DllCall($ProGUI, "int", "GetSkinPropertyColour", "int", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property)
   EndIf
   Return $result[0]
EndFunc

Func GetSkinPropertySubParamColour($Skin, $Component, $State, $Property, $Parameter, $Index) ; if skin property parameter's comma separated sub value is a colour then returns numerical colour value else -1
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetSkinPropertySubParamColour", "INT64", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "wstr", $Parameter, "INT64", $Index)
   Else
      $result = DllCall($ProGUI, "int", "GetSkinPropertySubParamColour", "int", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "wstr", $Parameter, "int", $Index)
   EndIf
   Return $result[0]
EndFunc

Func GetSkinPropertyData($Skin, $Component, $State, $Property) ; Gets a pointer to skin's property data
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetSkinPropertyData", "INT64", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property)
   Else
      $result = DllCall($ProGUI, "int", "GetSkinPropertyData", "int", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property)
   EndIf
   Return $result[0]
EndFunc

Func GetSkinPropertyDataSize($Skin, $Component, $State, $Property) ; Get the size in bytes of skin's property data
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetSkinPropertyDataSize", "INT64", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property)
   Else
      $result = DllCall($ProGUI, "int", "GetSkinPropertyDataSize", "int", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property)
   EndIf
   Return $result[0]
EndFunc

Func SetSkinPropertyData($Skin, $Component, $State, $Property, $ResourceData) ; Set skin's property data
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetSkinPropertyData", "INT64", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "INT64", $ResourceData)
   Else
      $result = DllCall($ProGUI, "int", "SetSkinPropertyData", "int", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "int", $ResourceData)
   EndIf
   Return $result[0]
EndFunc

Func SetSkinPropertyDataSize($Skin, $Component, $State, $Property, $DataSize) ; Set the size in bytes of skin's property data
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetSkinPropertyDataSize", "INT64", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "INT64", $DataSize)
   Else
      $result = DllCall($ProGUI, "int", "SetSkinPropertyDataSize", "int", $Skin, "wstr", $Component, "wstr", $State, "wstr", $Property, "int", $DataSize)
   EndIf
   Return $result[0]
EndFunc

Func MergeSkins($Skin1, $Skin2, $Name) ; Merges two skins, returning a new skin.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "MergeSkins", "INT64", $Skin1, "INT64", $Skin2, "wstr", $Name)
   Else
      $result = DllCall($ProGUI, "int", "MergeSkins", "int", $Skin1, "int", $Skin2, "wstr", $Name)
   EndIf
   Return $result[0]
EndFunc

Func CopySkin($Skin) ; Returns a copy of the specified skin
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CopySkin", "INT64", $Skin)
   Else
      $result = DllCall($ProGUI, "int", "CopySkin", "int", $Skin)
   EndIf
   Return $result[0]
EndFunc

Func IsSkin($Skin) ; Returns true if handle is a skin.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "IsSkin", "INT64", $Skin)
   Else
      $result = DllCall($ProGUI, "int", "IsSkin", "int", $Skin)
   EndIf
   Return $result[0]
EndFunc

Func FreeSkin($Skin) ; Frees a skin from memory.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreeSkin", "INT64", $Skin)
   Else
      $result = DllCall($ProGUI, "int", "FreeSkin", "int", $Skin)
   EndIf
   Return $result[0]
EndFunc

Func CreateMenuEx($MenuID, $WindowID, $style) ; Creates a "floating" menu bar, see docs for different styles...
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CreateMenuEx", "long", $MenuID, "INT64", $WindowID, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "CreateMenuEx", "long", $MenuID, "int", $WindowID, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func CreatePopupMenuEx($MenuID, $style) ; Creates a popup menu
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CreatePopupMenuEx", "long", $MenuID, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "CreatePopupMenuEx", "long", $MenuID, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func DisplayPopupMenuEx($menu, $WindowID, $x, $y) ; Displays a PopupMenuEx on screen at x, y coordinates
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "DisplayPopupMenuEx", "INT64", $menu, "INT64", $WindowID, "long", $x, "long", $y)
   Else
      $result = DllCall($ProGUI, "int", "DisplayPopupMenuEx", "int", $menu, "int", $WindowID, "long", $x, "long", $y)
   EndIf
   Return $result[0]
EndFunc

Func MenuExF10Disable($disable)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "MenuExF10Disable", "INT64", $disable)
   Else
      $result = DllCall($ProGUI, "int", "MenuExF10Disable", "int", $disable)
   EndIf
   Return $result[0]
EndFunc

Func MenuExAutoHotKeyDisable($disable)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "MenuExAutoHotKeyDisable", "INT64", $disable)
   Else
      $result = DllCall($ProGUI, "int", "MenuExAutoHotKeyDisable", "int", $disable)
   EndIf
   Return $result[0]
EndFunc

Func SetMenuExStyle($menu, $style) ; sets the rendering style of a menuEx
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetMenuExStyle", "INT64", $menu, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "SetMenuExStyle", "int", $menu, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func MenuTitleEx($title) ; Creates a title on menu bar
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "MenuTitleEx", "wstr", $title)
   Else
      $result = DllCall($ProGUI, "int", "MenuTitleEx", "wstr", $title)
   EndIf
   Return $result[0]
EndFunc

Func SetMenuExImageSize($width, $height) ; sets the image dimensions for icons in menu
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetMenuExImageSize", "long", $width, "long", $height)
   Else
      $result = DllCall($ProGUI, "int", "SetMenuExImageSize", "long", $width, "long", $height)
   EndIf
   Return $result[0]
EndFunc

Func MenuItemEx($MenuItemID, $text, $normalImageID, $hotImageID, $disabledImageID, $submenu) ; Creates a menu item with an optional icon
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "MenuItemEx", "long", $MenuItemID, "wstr", $text, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $disabledImageID, "INT64", $submenu)
   Else
      $result = DllCall($ProGUI, "int", "MenuItemEx", "long", $MenuItemID, "wstr", $text, "int", $normalImageID, "int", $hotImageID, "int", $disabledImageID, "int", $submenu)
   EndIf
   Return $result[0]
EndFunc

Func MenuBarEx()
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "MenuBarEx")
   Else
      $result = DllCall($ProGUI, "int", "MenuBarEx")
   EndIf
   Return $result[0]
EndFunc

Func SetMenuItemEx($menu, $itemID, $text, $normalImageID, $hotImageID, $disabledImageID, $submenu) ; Sets a menu item with optional image data
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetMenuItemEx", "INT64", $menu, "long", $itemID, "wstr", $text, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $disabledImageID, "INT64", $submenu)
   Else
      $result = DllCall($ProGUI, "int", "SetMenuItemEx", "int", $menu, "long", $itemID, "wstr", $text, "int", $normalImageID, "int", $hotImageID, "int", $disabledImageID, "int", $submenu)
   EndIf
   Return $result[0]
EndFunc

Func RemoveMenuItemEx($menu, $itemID, $byPosition) ; Removes a menu item from menuEx
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "RemoveMenuItemEx", "INT64", $menu, "long", $itemID, "INT64", $byPosition)
   Else
      $result = DllCall($ProGUI, "int", "RemoveMenuItemEx", "int", $menu, "long", $itemID, "int", $byPosition)
   EndIf
   Return $result[0]
EndFunc

Func InsertMenuItemEx($menu, $Position, $newItemID, $text, $normalImageID, $hotImageID, $disabledImageID, $submenu) ; Inserts a new menu item into a menuEx
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "InsertMenuItemEx", "INT64", $menu, "long", $Position, "long", $newItemID, "wstr", $text, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $disabledImageID, "INT64", $submenu)
   Else
      $result = DllCall($ProGUI, "int", "InsertMenuItemEx", "int", $menu, "long", $Position, "long", $newItemID, "wstr", $text, "int", $normalImageID, "int", $hotImageID, "int", $disabledImageID, "int", $submenu)
   EndIf
   Return $result[0]
EndFunc

Func GetMenuItemExText($menu, $itemID)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "wstr", "GetMenuItemExText", "INT64", $menu, "long", $itemID)
   Else
      $result = DllCall($ProGUI, "wstr", "GetMenuItemExText", "int", $menu, "long", $itemID)
   EndIf
   Return $result[0]
EndFunc

Func SetMenuExFont($fontID) ; Sets the font that MenuExs use for rendering text
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetMenuExFont", "INT64", $fontID)
   Else
      $result = DllCall($ProGUI, "int", "SetMenuExFont", "int", $fontID)
   EndIf
   Return $result[0]
EndFunc

Func GetMenuExFont() ; Gets the font that MenuExs use for rendering text
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetMenuExFont")
   Else
      $result = DllCall($ProGUI, "int", "GetMenuExFont")
   EndIf
   Return $result[0]
EndFunc

Func MenuExID($id)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "MenuExID", "long", $id)
   Else
      $result = DllCall($ProGUI, "int", "MenuExID", "long", $id)
   EndIf
   Return $result[0]
EndFunc

Func DisableMenuItemEx($menu, $itemID, $state)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "DisableMenuItemEx", "INT64", $menu, "long", $itemID, "INT64", $state)
   Else
      $result = DllCall($ProGUI, "int", "DisableMenuItemEx", "int", $menu, "long", $itemID, "int", $state)
   EndIf
   Return $result[0]
EndFunc

Func SetMenuExItemState($menu, $itemID, $state) ; Sets a menu item checkbox/radiocheck state
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetMenuExItemState", "INT64", $menu, "long", $itemID, "long", $state)
   Else
      $result = DllCall($ProGUI, "int", "SetMenuExItemState", "int", $menu, "long", $itemID, "long", $state)
   EndIf
   Return $result[0]
EndFunc

Func GetMenuExItemState($menu, $itemID) ; Gets a menu item checkbox/radiocheck state
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetMenuExItemState", "INT64", $menu, "long", $itemID)
   Else
      $result = DllCall($ProGUI, "int", "GetMenuExItemState", "int", $menu, "long", $itemID)
   EndIf
   Return $result[0]
EndFunc

Func CalcMenuItemWidth($menu) ; Calculates the width of a popup menu
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CalcMenuItemWidth", "INT64", $menu)
   Else
      $result = DllCall($ProGUI, "int", "CalcMenuItemWidth", "int", $menu)
   EndIf
   Return $result[0]
EndFunc

Func GetMenuExBarHeight($menu)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetMenuExBarHeight", "INT64", $menu)
   Else
      $result = DllCall($ProGUI, "int", "GetMenuExBarHeight", "int", $menu)
   EndIf
   Return $result[0]
EndFunc

Func FreeMenuEx($menu) ; frees an extended menu from memory
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreeMenuEx", "INT64", $menu)
   Else
      $result = DllCall($ProGUI, "int", "FreeMenuEx", "int", $menu)
   EndIf
   Return $result[0]
EndFunc

Func CreateToolBarEx($id, $WindowID, $iconWidth, $iconHeight, $style) ; Creates an extended toolbar
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CreateToolBarEx", "long", $id, "INT64", $WindowID, "long", $iconWidth, "long", $iconHeight, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "CreateToolBarEx", "long", $id, "int", $WindowID, "long", $iconWidth, "long", $iconHeight, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func SetToolBarExStyle($toolbar, $style) ; Sets the rendering style of an extended toolbar
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetToolBarExStyle", "INT64", $toolbar, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "SetToolBarExStyle", "int", $toolbar, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func FreeToolBarEx($toolbar) ; Frees an extended toolbar from memory
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreeToolBarEx", "INT64", $toolbar)
   Else
      $result = DllCall($ProGUI, "int", "FreeToolBarEx", "int", $toolbar)
   EndIf
   Return $result[0]
EndFunc

Func ToolBarImageButtonEx($buttonID, $text, $normalImageID, $hotImageID, $disabledImageID, $style) ; Creates an image toolbar button
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToolBarImageButtonEx", "long", $buttonID, "wstr", $text, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $disabledImageID, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "ToolBarImageButtonEx", "long", $buttonID, "wstr", $text, "int", $normalImageID, "int", $hotImageID, "int", $disabledImageID, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func ToolBarButtonEx($buttonID, $text, $style) ; Creates a normal text toolbar button
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToolBarButtonEx", "long", $buttonID, "wstr", $text, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "ToolBarButtonEx", "long", $buttonID, "wstr", $text, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func ToolBarSeparatorEx() ; Creates a ToolbarEx separator
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToolBarSeparatorEx")
   Else
      $result = DllCall($ProGUI, "int", "ToolBarSeparatorEx")
   EndIf
   Return $result[0]
EndFunc

Func ToolBarDropdownImageButtonEx($buttonID, $MenuID, $text, $normalImageID, $hotImageID, $disabledImageID, $style) ; Creates a dropdown type toolbar button
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToolBarDropdownImageButtonEx", "long", $buttonID, "INT64", $MenuID, "wstr", $text, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $disabledImageID, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "ToolBarDropdownImageButtonEx", "long", $buttonID, "int", $MenuID, "wstr", $text, "int", $normalImageID, "int", $hotImageID, "int", $disabledImageID, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func ToolBarExAttachDropdownMenu($toolbar, $buttonID, $menu)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToolBarExAttachDropdownMenu", "INT64", $toolbar, "long", $buttonID, "INT64", $menu)
   Else
      $result = DllCall($ProGUI, "int", "ToolBarExAttachDropdownMenu", "int", $toolbar, "long", $buttonID, "int", $menu)
   EndIf
   Return $result[0]
EndFunc

Func ToolBarExGadget($buttonID, $GadgetID, $LeftPadding, $TopPadding, $RightPadding, $BottomPadding, $ApplyUIStyle) ; Adds a gadget/control to the current ToolBarEx
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToolBarExGadget", "long", $buttonID, "INT64", $GadgetID, "long", $LeftPadding, "long", $TopPadding, "long", $RightPadding, "long", $BottomPadding, "INT64", $ApplyUIStyle)
   Else
      $result = DllCall($ProGUI, "int", "ToolBarExGadget", "long", $buttonID, "int", $GadgetID, "long", $LeftPadding, "long", $TopPadding, "long", $RightPadding, "long", $BottomPadding, "int", $ApplyUIStyle)
   EndIf
   Return $result[0]
EndFunc

Func InsertToolBarButtonEx($toolbar, $position, $buttonID, $text, $style) ; Inserts a toolbar button at position
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "InsertToolBarButtonEx", "INT64", $toolbar, "long", $position, "long", $buttonID, "wstr", $text, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "InsertToolBarButtonEx", "int", $toolbar, "long", $position, "long", $buttonID, "wstr", $text, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func InsertToolBarImageButtonEx($toolbar, $position, $buttonID, $text, $normalImageID, $hotImageID, $disabledImageID, $style) ; Inserts a toolbar image button at position
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "InsertToolBarImageButtonEx", "INT64", $toolbar, "long", $position, "long", $buttonID, "wstr", $text, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $disabledImageID, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "InsertToolBarImageButtonEx", "int", $toolbar, "long", $position, "long", $buttonID, "wstr", $text, "int", $normalImageID, "int", $hotImageID, "int", $disabledImageID, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func InsertToolBarSeparatorEx($toolbar, $position) ; Inserts a toolbar separator at position
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "InsertToolBarSeparatorEx", "INT64", $toolbar, "long", $position)
   Else
      $result = DllCall($ProGUI, "int", "InsertToolBarSeparatorEx", "int", $toolbar, "long", $position)
   EndIf
   Return $result[0]
EndFunc

Func InsertToolBarDropdownImageButtonEx($toolbar, $position, $buttonID, $MenuID, $text, $normalImageID, $hotImageID, $disabledImageID, $style) ; Inserts a dropdown type toolbar button at position
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "InsertToolBarDropdownImageButtonEx", "INT64", $toolbar, "long", $position, "long", $buttonID, "INT64", $MenuID, "wstr", $text, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $disabledImageID, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "InsertToolBarDropdownImageButtonEx", "int", $toolbar, "long", $position, "long", $buttonID, "int", $MenuID, "wstr", $text, "int", $normalImageID, "int", $hotImageID, "int", $disabledImageID, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func InsertToolBarExGadget($toolbar, $position, $buttonID, $GadgetID, $LeftPadding, $TopPadding, $RightPadding, $BottomPadding, $ApplyUIStyle) ; Inserts a gadget/control into a ToolBarEx at position
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "InsertToolBarExGadget", "INT64", $toolbar, "long", $position, "long", $buttonID, "INT64", $GadgetID, "long", $LeftPadding, "long", $TopPadding, "long", $RightPadding, "long", $BottomPadding, "INT64", $ApplyUIStyle)
   Else
      $result = DllCall($ProGUI, "int", "InsertToolBarExGadget", "int", $toolbar, "long", $position, "long", $buttonID, "int", $GadgetID, "long", $LeftPadding, "long", $TopPadding, "long", $RightPadding, "long", $BottomPadding, "int", $ApplyUIStyle)
   EndIf
   Return $result[0]
EndFunc

Func DisableToolbarExButton($toolbar, $buttonID, $state)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "DisableToolbarExButton", "INT64", $toolbar, "long", $buttonID, "INT64", $state)
   Else
      $result = DllCall($ProGUI, "int", "DisableToolbarExButton", "int", $toolbar, "long", $buttonID, "int", $state)
   EndIf
   Return $result[0]
EndFunc

Func SelectToolbarExButton($toolbar, $buttonID, $state)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SelectToolbarExButton", "INT64", $toolbar, "long", $buttonID, "INT64", $state)
   Else
      $result = DllCall($ProGUI, "int", "SelectToolbarExButton", "int", $toolbar, "long", $buttonID, "int", $state)
   EndIf
   Return $result[0]
EndFunc

Func ChangeToolbarExButton($toolbar, $buttonID, $text, $normalImageID, $hotImageID, $disabledImageID)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ChangeToolbarExButton", "INT64", $toolbar, "long", $buttonID, "wstr", $text, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $disabledImageID)
   Else
      $result = DllCall($ProGUI, "int", "ChangeToolbarExButton", "int", $toolbar, "long", $buttonID, "wstr", $text, "int", $normalImageID, "int", $hotImageID, "int", $disabledImageID)
   EndIf
   Return $result[0]
EndFunc

Func RemoveToolBarExButton($toolbar, $buttonID, $byPosition) ; Removes a button from a ToolBarEx
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "RemoveToolBarExButton", "INT64", $toolbar, "long", $buttonID, "INT64", $byPosition)
   Else
      $result = DllCall($ProGUI, "int", "RemoveToolBarExButton", "int", $toolbar, "long", $buttonID, "int", $byPosition)
   EndIf
   Return $result[0]
EndFunc

Func HideToolBarExButton($toolbar, $buttonID, $hide) ; Hides a button in a ToolBarEx, hide = True/False
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "HideToolBarExButton", "INT64", $toolbar, "long", $buttonID, "INT64", $hide)
   Else
      $result = DllCall($ProGUI, "int", "HideToolBarExButton", "int", $toolbar, "long", $buttonID, "int", $hide)
   EndIf
   Return $result[0]
EndFunc

Func ToolBarExToolTip($id, $buttonID, $text) ; Associates a tooltip with a toolbar button.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToolBarExToolTip", "INT64", $id, "long", $buttonID, "wstr", $text)
   Else
      $result = DllCall($ProGUI, "int", "ToolBarExToolTip", "int", $id, "long", $buttonID, "wstr", $text)
   EndIf
   Return $result[0]
EndFunc

Func ToolBarExToolTipDelay($id, $initial, $autopop, $reshow)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToolBarExToolTipDelay", "INT64", $id, "long", $initial, "long", $autopop, "long", $reshow)
   Else
      $result = DllCall($ProGUI, "int", "ToolBarExToolTipDelay", "int", $id, "long", $initial, "long", $autopop, "long", $reshow)
   EndIf
   Return $result[0]
EndFunc

Func ToolBarExID($id) ; Returns Windows handle of ToolBarEx
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToolBarExID", "long", $id)
   Else
      $result = DllCall($ProGUI, "int", "ToolBarExID", "long", $id)
   EndIf
   Return $result[0]
EndFunc

Func ToolBarExGadgetID($toolbar, $ButtonID) ; returns the Windows Handle (HWND) of a ToolBarEx gadget/control
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToolBarExGadgetID", "INT64", $toolbar, "long", $ButtonID)
   Else
      $result = DllCall($ProGUI, "int", "ToolBarExGadgetID", "int", $toolbar, "long", $ButtonID)
   EndIf
   Return $result[0]
EndFunc

Func ToolBarExButtonWidth($toolbar, $ButtonID) ; returns width of a ToolBarEx button
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToolBarExButtonWidth", "INT64", $toolbar, "long", $ButtonID)
   Else
      $result = DllCall($ProGUI, "int", "ToolBarExButtonWidth", "int", $toolbar, "long", $ButtonID)
   EndIf
   Return $result[0]
EndFunc

Func SetToolBarExButtonWidth($toolbar, $ButtonID, $Width) ; sets the width of a ToolBarEx button
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetToolBarExButtonWidth", "INT64", $toolbar, "long", $ButtonID, "long", $Width)
   Else
      $result = DllCall($ProGUI, "int", "SetToolBarExButtonWidth", "int", $toolbar, "long", $ButtonID, "long", $Width)
   EndIf
   Return $result[0]
EndFunc

Func ToolBarExHeight($toolbar) ; returns height of ToolBarEx
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToolBarExHeight", "INT64", $toolbar)
   Else
      $result = DllCall($ProGUI, "int", "ToolBarExHeight", "int", $toolbar)
   EndIf
   Return $result[0]
EndFunc

Func SetToolBarExHeight($toolbar, $Height) ; sets the height in pixels of all the buttons in a ToolBarEx
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetToolBarExHeight", "INT64", $toolbar, "long", $Height)
   Else
      $result = DllCall($ProGUI, "int", "SetToolBarExHeight", "int", $toolbar, "long", $Height)
   EndIf
   Return $result[0]
EndFunc

Func DisableToolBarExButtonFade($toolbar) ; disables Windows Vista/Windows 7 fade animation
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "DisableToolBarExButtonFade", "INT64", $toolbar)
   Else
      $result = DllCall($ProGUI, "int", "DisableToolBarExButtonFade", "int", $toolbar)
   EndIf
   Return $result[0]
EndFunc

Func CreateRebar($id, $WindowID, $backgroundImage, $style, $doublebuffer) ; Creates a rebar
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CreateRebar", "long", $id, "INT64", $WindowID, "INT64", $backgroundImage, "long", $style, "INT64", $doublebuffer)
   Else
      $result = DllCall($ProGUI, "int", "CreateRebar", "long", $id, "int", $WindowID, "int", $backgroundImage, "long", $style, "int", $doublebuffer)
   EndIf
   Return $result[0]
EndFunc

Func SetRebarStyle($rebar, $style) ; Sets the rendering style of a rebar
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetRebarStyle", "INT64", $rebar, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "SetRebarStyle", "int", $rebar, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func SetRebarUserCallback($Rebar, $UserCallback) ; Sets the User Callback function of a rebar
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetRebarUserCallback", "INT64", $Rebar, "INT64", $UserCallback)
   Else
      $result = DllCall($ProGUI, "int", "SetRebarUserCallback", "int", $Rebar, "int", $UserCallback)
   EndIf
   Return $result[0]
EndFunc

Func AddRebarGadget($gadgetID, $text, $width, $minWidth, $height, $backgroundImage, $style) ; Adds a gadget to a rebar
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "AddRebarGadget", "INT64", $gadgetID, "wstr", $text, "long", $width, "long", $minWidth, "long", $height, "INT64", $backgroundImage, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "AddRebarGadget", "int", $gadgetID, "wstr", $text, "long", $width, "long", $minWidth, "long", $height, "int", $backgroundImage, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func ShowRebarBand($rebar, $band, $state)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ShowRebarBand", "INT64", $rebar, "INT64", $band, "INT64", $state)
   Else
      $result = DllCall($ProGUI, "int", "ShowRebarBand", "int", $rebar, "int", $band, "int", $state)
   EndIf
   Return $result[0]
EndFunc

Func RebarHeight($rebar) ; returns height of rebar in pixels
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "RebarHeight", "INT64", $rebar)
   Else
      $result = DllCall($ProGUI, "int", "RebarHeight", "int", $rebar)
   EndIf
   Return $result[0]
EndFunc

Func FreeRebar($rebar) ; Frees a rebar from memory.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreeRebar", "INT64", $rebar)
   Else
      $result = DllCall($ProGUI, "int", "FreeRebar", "int", $rebar)
   EndIf
   Return $result[0]
EndFunc

Func DeleteRebarBand($rebar, $band) ; Deletes a Rebar's band.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "DeleteRebarBand", "INT64", $rebar, "long", $band)
   Else
      $result = DllCall($ProGUI, "int", "DeleteRebarBand", "int", $rebar, "long", $band)
   EndIf
   Return $result[0]
EndFunc

Func InsertRebarGadget($rebar, $band, $gadgetID, $text, $width, $minWidth, $height, $backgroundImage, $style) ; Inserts a gadget to a rebar band.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "InsertRebarGadget", "INT64", $rebar, "long", $band, "INT64", $gadgetID, "wstr", $text, "long", $width, "long", $minWidth, "long", $height, "INT64", $backgroundImage, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "InsertRebarGadget", "int", $rebar, "long", $band, "int", $gadgetID, "wstr", $text, "long", $width, "long", $minWidth, "long", $height, "int", $backgroundImage, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func RebarID($id)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "RebarID", "long", $id)
   Else
      $result = DllCall($ProGUI, "int", "RebarID", "long", $id)
   EndIf
   Return $result[0]
EndFunc

Func RebarBandID($Rebar, $Index) ; Returns the ID of the Rebar band at position Index.l
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "RebarBandID", "INT64", $Rebar, "long", $Index)
   Else
      $result = DllCall($ProGUI, "int", "RebarBandID", "int", $Rebar, "long", $Index)
   EndIf
   Return $result[0]
EndFunc

Func MoveRebarBand($Rebar, $SourceBandIndex, $DestinationBandIndex) ; Moves a Rebar band to a new zero based index position
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "MoveRebarBand", "INT64", $Rebar, "long", $SourceBandIndex, "long", $DestinationBandIndex)
   Else
      $result = DllCall($ProGUI, "int", "MoveRebarBand", "int", $Rebar, "long", $SourceBandIndex, "long", $DestinationBandIndex)
   EndIf
   Return $result[0]
EndFunc

Func SaveRebarLayout($Rebar, $Path) ; Saves the layout of a Rebar's bands to the file specified in Path.s
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SaveRebarLayout", "INT64", $Rebar, "wstr", $Path)
   Else
      $result = DllCall($ProGUI, "int", "SaveRebarLayout", "int", $Rebar, "wstr", $Path)
   EndIf
   Return $result[0]
EndFunc

Func LoadRebarLayout($Rebar, $LayoutFilename) ; Loads a previously saved Rebar's layout
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "LoadRebarLayout", "INT64", $Rebar, "wstr", $LayoutFilename)
   Else
      $result = DllCall($ProGUI, "int", "LoadRebarLayout", "int", $Rebar, "wstr", $LayoutFilename)
   EndIf
   Return $result[0]
EndFunc

Func TextControlEx($Window, $id, $x, $y, $width, $height, $text, $flags)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "TextControlEx", "INT64", $Window, "long", $id, "INT64", $x, "INT64", $y, "long", $width, "long", $height, "wstr", $text, "long", $flags)
   Else
      $result = DllCall($ProGUI, "int", "TextControlEx", "int", $Window, "long", $id, "int", $x, "int", $y, "long", $width, "long", $height, "wstr", $text, "long", $flags)
   EndIf
   Return $result[0]
EndFunc

Func SetTextControlExPadding($id, $leftPadding, $topPadding, $rightPadding, $bottomPadding)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetTextControlExPadding", "INT64", $id, "long", $leftPadding, "long", $topPadding, "long", $rightPadding, "long", $bottomPadding)
   Else
      $result = DllCall($ProGUI, "int", "SetTextControlExPadding", "int", $id, "long", $leftPadding, "long", $topPadding, "long", $rightPadding, "long", $bottomPadding)
   EndIf
   Return $result[0]
EndFunc

Func SetTextControlExFont($id, $fontID, $antialiased)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetTextControlExFont", "INT64", $id, "INT64", $fontID, "INT64", $antialiased)
   Else
      $result = DllCall($ProGUI, "int", "SetTextControlExFont", "int", $id, "int", $fontID, "int", $antialiased)
   EndIf
   Return $result[0]
EndFunc

Func SetTextControlExColour($id, $textColour, $backColour)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetTextControlExColour", "INT64", $id, "long", $textColour, "long", $backColour)
   Else
      $result = DllCall($ProGUI, "int", "SetTextControlExColour", "int", $id, "long", $textColour, "long", $backColour)
   EndIf
   Return $result[0]
EndFunc

Func SetTextControlExGradient($id, $Gradient)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetTextControlExGradient", "INT64", $id, "INT64", $Gradient)
   Else
      $result = DllCall($ProGUI, "int", "SetTextControlExGradient", "int", $id, "int", $Gradient)
   EndIf
   Return $result[0]
EndFunc

Func SetTextControlExText($id, $text)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetTextControlExText", "INT64", $id, "wstr", $text)
   Else
      $result = DllCall($ProGUI, "int", "SetTextControlExText", "int", $id, "wstr", $text)
   EndIf
   Return $result[0]
EndFunc

Func SetTextControlExStyle($id, $style)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetTextControlExStyle", "INT64", $id, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "SetTextControlExStyle", "int", $id, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func SetTextControlExLinePadding($id, $padding)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetTextControlExLinePadding", "INT64", $id, "long", $padding)
   Else
      $result = DllCall($ProGUI, "int", "SetTextControlExLinePadding", "int", $id, "long", $padding)
   EndIf
   Return $result[0]
EndFunc

Func SetTextControlExDimensions($id, $width, $height) ; sets the width/height of a previously created TextControlEx
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetTextControlExDimensions", "INT64", $id, "long", $width, "long", $height)
   Else
      $result = DllCall($ProGUI, "int", "SetTextControlExDimensions", "int", $id, "long", $width, "long", $height)
   EndIf
   Return $result[0]
EndFunc

Func TextControlExWidth($id) ; Returns the width in pixels of a TextControlEx
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "TextControlExWidth", "INT64", $id)
   Else
      $result = DllCall($ProGUI, "int", "TextControlExWidth", "int", $id)
   EndIf
   Return $result[0]
EndFunc

Func TextControlExHeight($id) ; Returns the height in pixels of a TextControlEx
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "TextControlExHeight", "INT64", $id)
   Else
      $result = DllCall($ProGUI, "int", "TextControlExHeight", "int", $id)
   EndIf
   Return $result[0]
EndFunc

Func TextControlExID($id) ; Returns Windows handle to TextControlEx
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "TextControlExID", "long", $id)
   Else
      $result = DllCall($ProGUI, "int", "TextControlExID", "long", $id)
   EndIf
   Return $result[0]
EndFunc

Func FreeTextControlEx($id) ; Frees a TextControlEx from memory.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreeTextControlEx", "INT64", $id)
   Else
      $result = DllCall($ProGUI, "int", "FreeTextControlEx", "int", $id)
   EndIf
   Return $result[0]
EndFunc

Func changeListiconSubIcon($listicon, $itempos, $subitempos, $image)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "changeListiconSubIcon", "INT64", $listicon, "long", $itempos, "long", $subitempos, "INT64", $image)
   Else
      $result = DllCall($ProGUI, "int", "changeListiconSubIcon", "int", $listicon, "long", $itempos, "long", $subitempos, "int", $image)
   EndIf
   Return $result[0]
EndFunc

Func ImageButtonEx($WindowID, $buttonID, $x, $y, $imageWidth, $imageHeight, $normalImageID, $hotImageID, $pressedImageID, $disabledImageID) ; Creates an extended image button
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ImageButtonEx", "INT64", $WindowID, "long", $buttonID, "long", $x, "long", $y, "long", $imageWidth, "long", $imageHeight, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $pressedImageID, "INT64", $disabledImageID)
   Else
      $result = DllCall($ProGUI, "int", "ImageButtonEx", "int", $WindowID, "long", $buttonID, "long", $x, "long", $y, "long", $imageWidth, "long", $imageHeight, "int", $normalImageID, "int", $hotImageID, "int", $pressedImageID, "int", $disabledImageID)
   EndIf
   Return $result[0]
EndFunc

Func SetButtonExSkin($ID, $Skin, $ComponentName) ; Sets a ButtonEx's skin
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetButtonExSkin", "INT64", $ID, "INT64", $Skin, "wstr", $ComponentName)
   Else
      $result = DllCall($ProGUI, "int", "SetButtonExSkin", "int", $ID, "int", $Skin, "wstr", $ComponentName)
   EndIf
   Return $result[0]
EndFunc

Func GetButtonExSkin($ID) ; Gets a ButtonEx's skin
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetButtonExSkin", "INT64", $ID)
   Else
      $result = DllCall($ProGUI, "int", "GetButtonExSkin", "int", $ID)
   EndIf
   Return $result[0]
EndFunc

Func ButtonEx($WindowID, $buttonID, $x, $y, $Width, $Height, $Text, $normalImageID, $hotImageID, $pressedImageID, $disabledImageID, $skin) ; Creates an extended skinned button
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ButtonEx", "INT64", $WindowID, "long", $buttonID, "long", $x, "long", $y, "long", $Width, "long", $Height, "wstr", $Text, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $pressedImageID, "INT64", $disabledImageID, "INT64", $skin)
   Else
      $result = DllCall($ProGUI, "int", "ButtonEx", "int", $WindowID, "long", $buttonID, "long", $x, "long", $y, "long", $Width, "long", $Height, "wstr", $Text, "int", $normalImageID, "int", $hotImageID, "int", $pressedImageID, "int", $disabledImageID, "int", $skin)
   EndIf
   Return $result[0]
EndFunc

Func ToggleButtonEx($WindowID, $buttonID, $x, $y, $Width, $Height, $Text, $normalImageID, $hotImageID, $pressedImageID, $selectedImageID, $hotSelectedImageID, $pressedSelectedImageID, $disabledImageID, $skin) ; Creates an extended skinned toggle state button
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ToggleButtonEx", "INT64", $WindowID, "long", $buttonID, "long", $x, "long", $y, "long", $Width, "long", $Height, "wstr", $Text, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $pressedImageID, "INT64", $selectedImageID, "INT64", $hotSelectedImageID, "INT64", $pressedSelectedImageID, "INT64", $disabledImageID, "INT64", $skin)
   Else
      $result = DllCall($ProGUI, "int", "ToggleButtonEx", "int", $WindowID, "long", $buttonID, "long", $x, "long", $y, "long", $Width, "long", $Height, "wstr", $Text, "int", $normalImageID, "int", $hotImageID, "int", $pressedImageID, "int", $selectedImageID, "int", $hotSelectedImageID, "int", $pressedSelectedImageID, "int", $disabledImageID, "int", $skin)
   EndIf
   Return $result[0]
EndFunc

Func RadioButtonEx($WindowID, $buttonID, $x, $y, $Width, $Height, $Text, $skin) ; Creates an extended skinned radio button or closes the current radio group if WindowID is null
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "RadioButtonEx", "INT64", $WindowID, "long", $buttonID, "long", $x, "long", $y, "long", $Width, "long", $Height, "wstr", $Text, "INT64", $skin)
   Else
      $result = DllCall($ProGUI, "int", "RadioButtonEx", "int", $WindowID, "long", $buttonID, "long", $x, "long", $y, "long", $Width, "long", $Height, "wstr", $Text, "int", $skin)
   EndIf
   Return $result[0]
EndFunc

Func CheckButtonEx($WindowID, $buttonID, $x, $y, $Width, $Height, $Text, $skin) ; Creates an extended skinned check box button
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CheckButtonEx", "INT64", $WindowID, "long", $buttonID, "long", $x, "long", $y, "long", $Width, "long", $Height, "wstr", $Text, "INT64", $skin)
   Else
      $result = DllCall($ProGUI, "int", "CheckButtonEx", "int", $WindowID, "long", $buttonID, "long", $x, "long", $y, "long", $Width, "long", $Height, "wstr", $Text, "int", $skin)
   EndIf
   Return $result[0]
EndFunc

Func ChangeButtonEx($id, $normalImageID, $hotImageID, $pressedImageID, $selectedImageID, $hotSelectedImageID, $pressedSelectedImageID, $disabledImageID) ; Changes a ButtonEx's images
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ChangeButtonEx", "INT64", $id, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $pressedImageID, "INT64", $selectedImageID, "INT64", $hotSelectedImageID, "INT64", $pressedSelectedImageID, "INT64", $disabledImageID)
   Else
      $result = DllCall($ProGUI, "int", "ChangeButtonEx", "int", $id, "int", $normalImageID, "int", $hotImageID, "int", $pressedImageID, "int", $selectedImageID, "int", $hotSelectedImageID, "int", $pressedSelectedImageID, "int", $disabledImageID)
   EndIf
   Return $result[0]
EndFunc

Func ButtonExToolTip($id, $text)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ButtonExToolTip", "INT64", $id, "wstr", $text)
   Else
      $result = DllCall($ProGUI, "int", "ButtonExToolTip", "int", $id, "wstr", $text)
   EndIf
   Return $result[0]
EndFunc

Func ButtonExID($id) ; Returns a handle to a ButtonEx's window
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ButtonExID", "long", $id)
   Else
      $result = DllCall($ProGUI, "int", "ButtonExID", "long", $id)
   EndIf
   Return $result[0]
EndFunc

Func DisableButtonEx($id, $disable) ; Disables/enables a ButtonEx, disable = True/False
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "DisableButtonEx", "INT64", $id, "INT64", $disable)
   Else
      $result = DllCall($ProGUI, "int", "DisableButtonEx", "int", $id, "int", $disable)
   EndIf
   Return $result[0]
EndFunc

Func FreeButtonEx($id) ; Frees a ButtonEx from memory
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreeButtonEx", "INT64", $id)
   Else
      $result = DllCall($ProGUI, "int", "FreeButtonEx", "int", $id)
   EndIf
   Return $result[0]
EndFunc

Func SetSplitterExSkin($ID, $Skin, $ComponentName) ; Sets a SplitterEx's skin
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetSplitterExSkin", "INT64", $ID, "INT64", $Skin, "wstr", $ComponentName)
   Else
      $result = DllCall($ProGUI, "int", "SetSplitterExSkin", "int", $ID, "int", $Skin, "wstr", $ComponentName)
   EndIf
   Return $result[0]
EndFunc

Func GetSplitterExSkin($ID) ; Gets a SplitterEx's skin
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetSplitterExSkin", "INT64", $ID)
   Else
      $result = DllCall($ProGUI, "int", "GetSplitterExSkin", "int", $ID)
   EndIf
   Return $result[0]
EndFunc

Func SplitterEx($WindowID, $SplitterID, $x, $y, $Width, $Height, $WindowID1, $WindowID2, $Skin, $Flags) ; Creates a skinned splitter control
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SplitterEx", "INT64", $WindowID, "long", $SplitterID, "long", $x, "long", $y, "long", $Width, "long", $Height, "INT64", $WindowID1, "INT64", $WindowID2, "INT64", $Skin, "INT64", $Flags)
   Else
      $result = DllCall($ProGUI, "int", "SplitterEx", "int", $WindowID, "long", $SplitterID, "long", $x, "long", $y, "long", $Width, "long", $Height, "int", $WindowID1, "int", $WindowID2, "int", $Skin, "int", $Flags)
   EndIf
   Return $result[0]
EndFunc

Func SetSplitterExAttribute($ID, $Attribute, $Value) ; Sets a SplitterEx's attributes
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetSplitterExAttribute", "INT64", $ID, "INT64", $Attribute, "INT64", $Value)
   Else
      $result = DllCall($ProGUI, "int", "SetSplitterExAttribute", "int", $ID, "int", $Attribute, "int", $Value)
   EndIf
   Return $result[0]
EndFunc

Func GetSplitterExAttribute($ID, $Attribute) ; Gets a SplitterEx's attribute
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetSplitterExAttribute", "INT64", $ID, "INT64", $Attribute)
   Else
      $result = DllCall($ProGUI, "int", "GetSplitterExAttribute", "int", $ID, "int", $Attribute)
   EndIf
   Return $result[0]
EndFunc

Func SplitterExID($id) ; Returns a handle to a SplitterEx's window
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SplitterExID", "long", $id)
   Else
      $result = DllCall($ProGUI, "int", "SplitterExID", "long", $id)
   EndIf
   Return $result[0]
EndFunc

Func FreeSplitterEx($id) ; Frees a SplitterEx from memory
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreeSplitterEx", "INT64", $id)
   Else
      $result = DllCall($ProGUI, "int", "FreeSplitterEx", "int", $id)
   EndIf
   Return $result[0]
EndFunc

Func CreateGradient($style, $colour1, $colour2) ; Creates a gradient
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CreateGradient", "long", $style, "long", $colour1, "long", $colour2)
   Else
      $result = DllCall($ProGUI, "int", "CreateGradient", "long", $style, "long", $colour1, "long", $colour2)
   EndIf
   Return $result[0]
EndFunc

Func SetGradient($Gradient, $style) ; Sets a previously created gradient's style
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetGradient", "INT64", $Gradient, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "SetGradient", "int", $Gradient, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func SetGradientColour($Gradient, $Position, $Colour) ; Sets a gradient's colour at blend position
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetGradientColour", "INT64", $Gradient, "float", $Position, "long", $Colour)
   Else
      $result = DllCall($ProGUI, "int", "SetGradientColour", "int", $Gradient, "float", $Position, "long", $Colour)
   EndIf
   Return $result[0]
EndFunc

Func GetGradientColour($Gradient, $Position) ; Gets a gradient's colour at blend position
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "GetGradientColour", "INT64", $Gradient, "float", $Position)
   Else
      $result = DllCall($ProGUI, "int", "GetGradientColour", "int", $Gradient, "float", $Position)
   EndIf
   Return $result[0]
EndFunc

Func RemoveGradientColour($Gradient, $Position) ; Removes a gradient's colour at blend position
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "RemoveGradientColour", "INT64", $Gradient, "float", $Position)
   Else
      $result = DllCall($ProGUI, "int", "RemoveGradientColour", "int", $Gradient, "float", $Position)
   EndIf
   Return $result[0]
EndFunc

Func FreeGradient($Gradient) ; Frees a gradient from memory.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreeGradient", "INT64", $Gradient)
   Else
      $result = DllCall($ProGUI, "int", "FreeGradient", "int", $Gradient)
   EndIf
   Return $result[0]
EndFunc

Func CreateCommandBar($id, $WindowID, $style) ; Creates a CommandBar container
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CreateCommandBar", "long", $id, "INT64", $WindowID, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "CreateCommandBar", "long", $id, "int", $WindowID, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func CreateCommandBarEx($id, $WindowID, $background, $backgroundImg, $imageX, $imageY, $imageWidth, $imageHeight, $style) ; Creates a CommandBar container
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CreateCommandBarEx", "long", $id, "INT64", $WindowID, "INT64", $background, "INT64", $backgroundImg, "long", $imageX, "long", $imageY, "long", $imageWidth, "long", $imageHeight, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "CreateCommandBarEx", "long", $id, "int", $WindowID, "int", $background, "int", $backgroundImg, "long", $imageX, "long", $imageY, "long", $imageWidth, "long", $imageHeight, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func AddCommandBarGadget($gadgetID, $text, $minWidth, $minheight, $style) ; Adds a Gadget to the current CommandBar container
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "AddCommandBarGadget", "INT64", $gadgetID, "wstr", $text, "long", $minWidth, "long", $minheight, "long", $style)
   Else
      $result = DllCall($ProGUI, "int", "AddCommandBarGadget", "int", $gadgetID, "wstr", $text, "long", $minWidth, "long", $minheight, "long", $style)
   EndIf
   Return $result[0]
EndFunc

Func SetExplorerBarSkin($ID, $Skin, $ComponentName) ; Sets an ExplorerBar's skin
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "SetExplorerBarSkin", "INT64", $ID, "INT64", $Skin, "wstr", $ComponentName)
   Else
      $result = DllCall($ProGUI, "int", "SetExplorerBarSkin", "int", $ID, "int", $Skin, "wstr", $ComponentName)
   EndIf
   Return $result[0]
EndFunc

Func CreateExplorerBar($WindowID, $ExplorerBarID, $x, $y, $Width, $Height, $Skin) ; Creates an empty skinned ExplorerBar control
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "CreateExplorerBar", "INT64", $WindowID, "long", $ExplorerBarID, "long", $x, "long", $y, "long", $Width, "long", $Height, "INT64", $Skin)
   Else
      $result = DllCall($ProGUI, "int", "CreateExplorerBar", "int", $WindowID, "long", $ExplorerBarID, "long", $x, "long", $y, "long", $Width, "long", $Height, "int", $Skin)
   EndIf
   Return $result[0]
EndFunc

Func AddExplorerBarImageGroup($Title, $normalImageID, $hotImageID, $pressedImageID, $selectedImageID, $hotSelectedImageID, $pressedSelectedImageID, $disabledImageID) ; Adds a new group with header icon/image to the current previously created ExplorerBar control
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "AddExplorerBarImageGroup", "wstr", $Title, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $pressedImageID, "INT64", $selectedImageID, "INT64", $hotSelectedImageID, "INT64", $pressedSelectedImageID, "INT64", $disabledImageID)
   Else
      $result = DllCall($ProGUI, "int", "AddExplorerBarImageGroup", "wstr", $Title, "int", $normalImageID, "int", $hotImageID, "int", $pressedImageID, "int", $selectedImageID, "int", $hotSelectedImageID, "int", $pressedSelectedImageID, "int", $disabledImageID)
   EndIf
   Return $result[0]
EndFunc

Func AddExplorerBarGroup($Title) ; Adds a new group to the current previously created ExplorerBar control
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "AddExplorerBarGroup", "wstr", $Title)
   Else
      $result = DllCall($ProGUI, "int", "AddExplorerBarGroup", "wstr", $Title)
   EndIf
   Return $result[0]
EndFunc

Func ExplorerBarImageItem($ItemID, $Text, $normalImageID, $hotImageID, $pressedImageID, $disabledImageID) ; Adds a new item with icon/image to the current previously created ExplorerBar group.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ExplorerBarImageItem", "long", $ItemID, "wstr", $Text, "INT64", $normalImageID, "INT64", $hotImageID, "INT64", $pressedImageID, "INT64", $disabledImageID)
   Else
      $result = DllCall($ProGUI, "int", "ExplorerBarImageItem", "long", $ItemID, "wstr", $Text, "int", $normalImageID, "int", $hotImageID, "int", $pressedImageID, "int", $disabledImageID)
   EndIf
   Return $result[0]
EndFunc

Func ExplorerBarItem($ItemID, $Text) ; Adds a new item to the current previously created ExplorerBar group.
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ExplorerBarItem", "long", $ItemID, "wstr", $Text)
   Else
      $result = DllCall($ProGUI, "int", "ExplorerBarItem", "long", $ItemID, "wstr", $Text)
   EndIf
   Return $result[0]
EndFunc

Func ExplorerBarID($id) ; Returns a handle to an ExplorerBar's window (HWND)
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "ExplorerBarID", "long", $id)
   Else
      $result = DllCall($ProGUI, "int", "ExplorerBarID", "long", $id)
   EndIf
   Return $result[0]
EndFunc

Func FreeExplorerBar($id) ; Frees an ExplorerBar from memory
   If @AutoItX64 = 1 Then
      $result = DllCall($ProGUI, "INT64", "FreeExplorerBar", "INT64", $id)
   Else
      $result = DllCall($ProGUI, "int", "FreeExplorerBar", "int", $id)
   EndIf
   Return $result[0]
EndFunc

