'+--------------------------------------------------------------------------+
'|                                                                          |
'|                                WinLIFT.INC                               |
'|                                                                          |
'|             WinLIFT simplified API constants and declarations.           |
'|                                                                          |
'|                               Version 4.89                               |
'|                                                                          |
'+--------------------------------------------------------------------------+
'|                                                                          |
'|                         Author Patrice TERRIER                           |
'|            8 Domaine de Rochagnon. 38800 Champagnier  FRANCE             |
'|                       http://www.zapsolution.com                         |
'|                    E-mail: pterrier@zapsolution.com                      |
'|                                                                          |
'|                 copyright (c) 2003-2010 Patrice TERRIER                  |
'|                                                                          |
'+--------------------------------------------------------------------------+
'|                  Project started on : 02-24-2003                         |
'|                        Last revised : 05-31-2011                         |
'+--------------------------------------------------------------------------+

' Init the WinLIFT SkinEngine
  DECLARE FUNCTION skInitEngine LIB "WinLIFT.DLL" ALIAS "skInitEngine" ( _
  zSkinFile AS ASCIIZ, _             ' The name of the .SKS file theme to use. 
  zUserKey AS ASCIIZ _               ' Private user key.
  ) AS LONG

' The main function to skin a window
  DECLARE FUNCTION skSkinWindow LIB "WinLIFT.dll" ALIAS "skSkinWindow" ( _
  BYVAL hWnd AS LONG, _              ' Handle of the popup window you want to skin.
  zSysButTip AS ASCIIZ _             ' The text of tooltip that will be shown when the mouse hover the system buttons.
  ) AS LONG

' Disable skinning of a specific control
  DECLARE FUNCTION skSkinDisable LIB "WinLIFT.dll" ALIAS "skSkinDisable" ( _
  BYVAL hCtrl AS LONG _              ' Handle of the child control to disable.
  ) AS LONG

' Enable skinning of a specific control (use it only after a previous call to skSkinDisable)
  DECLARE FUNCTION skSkinEnable LIB "WinLIFT.dll" ALIAS "skSkinEnable" ( _
  BYVAL hCtrl AS LONG _              ' Handle of the child control to enable (must be followed by a skSkinWindowUpdate).
  ) AS LONG

' Returns the "Skin" author name and copyright.
  DECLARE FUNCTION skAuthor LIB "WinLIFT.dll" ALIAS "skAuthor" () AS STRING

  %WM_SKGETMENUICON           = &H400 + &H7F  ' &H400 = %WM_USER, &H7F  = %WM_GETICON
                                              ' wParam = menu ID, lParam = %NULL
                                      
' Anchor child controls
  DECLARE FUNCTION skSetAnchorCtrl LIB "WinLIFT.dll" ALIAS "skSetAnchorCtrl" ( _
  BYVAL hCtrl AS LONG, _             ' Handle of the child control to anchor.
  BYVAL AnchorMode AS LONG _         ' See the constant list below.
  ) AS LONG

' Anchor constants
  %ANCHOR_NONE                = 0
  %ANCHOR_LEFT                = %ANCHOR_NONE
  %ANCHOR_WIDTH               = 1
  %ANCHOR_RIGHT               = 2
  %ANCHOR_CENTER_HORZ         = 3
  %ANCHOR_HEIGHT              = 4
  %ANCHOR_HEIGHT_WIDTH        = 5
  %ANCHOR_HEIGHT_RIGHT        = 6
  %ANCHOR_BOTTOM              = 7
  %ANCHOR_BOTTOM_WIDTH        = 8
  %ANCHOR_BOTTOM_RIGHT        = 9
  %ANCHOR_CENTER_HORZ_BOTTOM  = 10
  %ANCHOR_CENTER_VERT         = 11
  %ANCHOR_CENTER_VERT_RIGHT   = 12
  %ANCHOR_CENTER              = 13

'****************************************************************************
'*                THESE MUST BE USED WITH WINLIFT's MENU                    *
'****************************************************************************
' Replace the standard DrawMenuBar API, must be used with WinLIFT's menu
  DECLARE SUB skRedrawMenuBar LIB "WinLIFT.dll" ALIAS "skRedrawMenuBar" ( _
  BYVAL hWinliftMenu AS LONG _       ' The WinLIFT menu handle.
  )

' Note: WinLIFT's menu are not standard menu, thus do not use the standard API GetMenu
' to retrieve a menu handle but the specific skGetMenu below.
' Instead of using skGetMenu you can also save the menu handle in a global variable and then
' use this global variable in lieu of the GetMenu API.
  DECLARE FUNCTION skGetMenu LIB "WinLIFT.dll" ALIAS "skGetMenu" ( _
  BYVAL hWinliftMenu AS LONG _       ' The internal WinLIFT menu handle.
  ) AS LONG                          ' RETURN: the Windows menu handle.

' Retrieve the handle of the WinLIFT's menu container
  DECLARE FUNCTION skMenuContainer LIB "WinLIFT.dll" ALIAS "skMenuContainer" (BYVAL hWnd&) AS LONG
'****************************************************************************
'*                           END OF SKINNED MENU                            *
'****************************************************************************

  DECLARE FUNCTION skCreateDW LIB "WinLIFT.dll" ALIAS "skCreateDW" (BYVAL hParent AS LONG) AS LONG
  DECLARE SUB      skDestroyDW LIB "WinLIFT.dll" ALIAS "skDestroyDW" (BYREF hDW AS LONG)

  DECLARE FUNCTION skDialogAlert LIB "WinLIFT.dll" ALIAS "skDialogAlert" ( _
  zCaption AS ASCIIZ, _              ' Text of the caption.
  zMessage AS ASCIIZ, _              ' Text of the message.
  zButton AS ASCIIZ _                ' Text of the button (will be "Ok" if empty).
  ) AS LONG                          ' RETURN: nothing.
  DECLARE FUNCTION skDialogError LIB "WinLIFT.dll" ALIAS "skDialogError" ( _
  zCaption AS ASCIIZ, _              ' Text of the caption.
  zMessage AS ASCIIZ, _              ' Text of the message.
  zButton AS ASCIIZ _                ' Text of the button (will be "Ok" if empty).
  ) AS LONG                          ' RETURN: nothing.
  DECLARE FUNCTION skDialogInfo LIB "WinLIFT.dll" ALIAS "skDialogInfo" ( _
  zCaption AS ASCIIZ, _              ' Text of the caption.
  zMessage AS ASCIIZ, _              ' Text of the message.
  zButton AS ASCIIZ _                ' Text of the button (will be "Ok" if empty).
  ) AS LONG                          ' RETURN: nothing.
  DECLARE FUNCTION skDialogYesNo LIB "WinLIFT.dll" ALIAS "skDialogYesNo" ( _
  zCaption AS ASCIIZ, _              ' Text of the caption.
  zMessage AS ASCIIZ, _              ' Text of the message.
  zButton AS ASCIIZ _                ' "@Yes|No", the "@" char means put the focus on this button.
  ) AS LONG                          ' RETURN: TRUE for Yes, FALSE for No.
  DECLARE FUNCTION skDialogInput LIB "WinLIFT.dll" ALIAS "skDialogInput" ( _
  zCaption AS ASCIIZ, _              ' Text of the caption.
  zMessage AS ASCIIZ, _              ' Text of the input message.
  zButton AS ASCIIZ _                ' Text of the button (will be "Ok" if empty).
  ) AS STRING                        ' RETURN: the text entered by the user.

  DECLARE FUNCTION skVersion LIB "WinLIFT.dll" ALIAS "skVersion" () AS STRING

  DECLARE FUNCTION skCaptionFont LIB "WinLIFT.dll" ALIAS "skCaptionFont" () AS LONG
  DECLARE FUNCTION skFont LIB "WinLIFT.dll" ALIAS "skFont" () AS LONG
  DECLARE FUNCTION skFontBold LIB "WinLIFT.dll" ALIAS "skFontBold" () AS LONG
  DECLARE FUNCTION skFontDlg LIB "WinLIFT.dll" ALIAS "skFontDlg" () AS LONG

  DECLARE FUNCTION skButtonImage LIB "WinLIFT.dll" ALIAS "skButtonImage" ( _
  BYVAL hOwner AS LONG, _            ' Handle of the window parent owner.
  zFullpathImageName AS ASCIIZ, _    ' Full path name to the button image.
  BYVAL x AS LONG, _                 ' X location of the button.
  BYVAL y AS LONG, _                 ' Y location of the button.
  BYVAL ButID AS LONG, _             ' Unique ID of the button.
  BYVAL StateMax AS LONG _           ' Number of state of the button image.
  ) AS LONG

  DECLARE FUNCTION skBorder LIB "WinLIFT.dll" ALIAS "skBorder" ( _
  BYVAL hParentCtrl AS LONG, _       ' Handle of the child control being used as parent.
  BYVAL x AS LONG, _                 ' X location of the border.
  BYVAL y AS LONG, _                 ' Y location of the border.
  BYVAL xW AS LONG, _                ' Width of the border.
  BYVAL yH AS LONG, _                ' Height of the border.
  BYVAL BorderID AS LONG, _          ' Unique ID of the border control.
  BYVAL UseBorderSize AS LONG _      ' The pen size to draw the border.
  ) AS LONG

' // Tooltip.
  DECLARE FUNCTION skCreateToolTip LIB "WinLIFT.dll" ALIAS "skCreateToolTip" ( _
  BYVAL hCtrl AS LONG, _             ' Handle of the child control.
  zText AS ASCIIZ _                  ' The text to display.
  ) AS LONG
  DECLARE SUB skSetToolTipText LIB "WinLIFT.dll" ALIAS "skSetToolTipText" ( _
  BYVAL hCtrl AS LONG, _             ' Handle of the child control.
  zText AS ASCIIZ _                  ' The new text.
  )
  DECLARE FUNCTION skGetToolTipText LIB "WinLIFT.dll" ALIAS "skGetToolTipText" ( _
  BYVAL hCtrl AS LONG _              ' Handle of the child control.
  ) AS STRING                        ' RETURN: the current text.

' // Create a button from a 5-state image.
  DECLARE FUNCTION skPushButtonImage LIB "WinLIFT.dll" ALIAS "skPushButtonImage" ( _
  BYVAL hOwner AS LONG, _            ' Handle of the window parent owner.
  zFullpathImageName AS ASCIIZ, _    ' Full path name to the image shown on button.
  zLabel AS ASCIIZ, _                ' The text label of the button.
  BYVAL x AS LONG, _                 ' X location of the button.
  BYVAL y AS LONG, _                 ' Y location of the button.
  BYVAL W AS LONG, _                 ' Width of the button.
  BYVAL H AS LONG, _                 ' Height of the button.
  BYVAL UseID AS LONG, _             ' Unique ID of the button.
  BYVAL nAlignment AS LONG _         ' Button style alignment (%BS_LEFT, %BS_RIGHT, %BS_CENTER, %BS_TOP, %BS_BOTTOM).
  ) AS LONG

' //Return the skin folder full path, completed with a trailing back slash.
  DECLARE FUNCTION skSkinFolder LIB "WinLIFT.dll" ALIAS "skSkinFolder" () AS STRING


' // 4.73 Animated clock control
  DECLARE FUNCTION skClockCtrl LIB "WinLIFT.DLL" ALIAS "skClockCtrl" ( _
  BYVAL hOwner AS LONG, _            ' Handle of the window parent owner.
  zFullpathImageName AS ASCIIZ, _    ' Full path name to the clock image background.
  BYVAL x AS LONG, _                 ' X location of the clock control.
  BYVAL y AS LONG, _                 ' Y location of the clock control.
  BYVAL W AS LONG, _                 ' Width of the clock control.
  BYVAL H AS LONG, _                 ' Height of the clock control.
  BYVAL ButID AS LONG, _             ' Unique ID of the clock control.
  BYVAL ARGB1 AS LONG, _             ' The color to draw the Hour/Minute hands.
  BYVAL ARGB2 AS LONG, _             ' The color to draw the second hands.
  OPTIONAL BYVAL GMToffset AS LONG _ ' The GMT offset to be used.
  ) AS LONG
  %DISABLE_TIMER = 99 '// Use this value in the optional GMToffset parameter to disable local timer in case of animated background

' // 4.75 To skin a child control on the fly, must be used AFTER the initial call to skInitEngine.
  DECLARE SUB skSkinChildCtrl LIB "WinLIFT.dll" ALIAS "skSkinChildCtrl" ( _
  BYVAL hCtrl AS LONG, _             ' The handle of the child control.
  BYVAL RedrawFlag AS LONG _         ' Redraw boolean flag.
  )

'// 4.77 Use this when new controls are added AFTER the initial skinning of the main window.
  DECLARE SUB skSkinWindowUpdate LIB "WinLIFT.dll" ALIAS "skSkinWindowUpdate" ( _
  BYVAL hWnd AS LONG, _              ' The main window handle.
  BYVAL RedrawFlag AS LONG _         ' Redraw boolean flag.
  )

' // 4.76 Create a Knob gauge control.
  DECLARE FUNCTION skKnobGauge LIB "WinLIFT.dll" ALIAS "skKnobGauge" ( _
  BYVAL hOwner AS LONG, _            ' Handle of the window parent owner.
  zFullpathImageName AS ASCIIZ, _    ' Full path name to the gauge image.
  BYVAL x AS LONG, _                 ' X location of the gauge control.
  BYVAL y AS LONG, _                 ' Y location of the gauge control.
  BYVAL W AS LONG, _                 ' Width of the gauge control.
  BYVAL H AS LONG, _                 ' Height of the gauge control.
  BYVAL ButID AS LONG, _             ' Unique ID of the gauge control.
  BYVAL MinValue AS LONG, _          ' MAXIMUM range value (the exclusion zone is between the MINIMUM and MAXIMUM range).
  BYVAL MaxValue AS LONG, _          ' MAXIMUM range value (the exclusion zone is between the MINIMUM and MAXIMUM range).
  BYVAL UsePos AS LONG, _            ' 0 or initial angle value in degree to use.
  BYVAL Reserved AS LONG _           ' Must be NULL.
  ) AS LONG
'// 4.76 Assign the Min/Max gauge value.
  DECLARE SUB skGaugeSetMinMax LIB "WinLIFT.dll" ALIAS "skGaugeSetMinMax" ( _
  BYVAL hCtrl AS LONG, _             ' The control handle.
  BYVAL nMin AS LONG, _              ' Minimum value (for knob this must be a rotation angle in the range 0-359).
  BYVAL nMax AS LONG _               ' Maximum value (for knob this must be a rotation angle in the range 0-359).
  )
'// 4.76 Retrieve the Min/Max gauge value.
  DECLARE SUB skGaugeGetMinMax LIB "WinLIFT.dll" ALIAS "skGaugeGetMinMax" ( _
  BYVAL hCtrl AS LONG, _             ' The control handle.
  BYREF nMin AS LONG, _              ' Minimum value (for knob this is a rotation angle in the range 0-359).
  BYREF nMax AS LONG _               ' Maximum value (for knob this is a rotation angle in the range 0-359).
  )
'// 4.76 Set the gauge value.
  DECLARE SUB skGaugeSetPos LIB "WinLIFT.dll" ALIAS "skGaugeSetPos" ( _
  BYVAL hCtrl AS LONG, _             ' The control handle.
  BYVAL nPos AS LONG, _              ' The pos value to set (must be an angle in the range 0-359 for Knob control).
  BYVAL RedrawFlag AS LONG _         ' Redraw boolean flag.
  )
'// 4.76 Get the gauge value.
  DECLARE FUNCTION skGaugeGetPos LIB "WinLIFT.dll" ALIAS "skGaugeGetPos" ( _
  BYVAL hCtrl AS LONG _              ' The control handle.
  ) AS LONG

'// 4.80 Create a full ARGB color (with alpha channel).
  DECLARE FUNCTION skARGB LIB "WinLIFT.dll" ALIAS "skARGB" ( _
  BYVAL A AS BYTE, _                 ' Alpha channel in the range 0-255 (0 full transparency, 255 full opaque mode).
  BYVAL R AS BYTE, _                 ' Red channel in the range 0-255.
  BYVAL G AS BYTE, _                 ' Green channel in the range 0-255.
  BYVAL B AS BYTE _                  ' Blue channel in the range 0-255.
  ) AS LONG

  %FontStyleRegular = 0
  %FontStyleBold = 1
  %FontStyleItalic = 2
  %FontStyleBoldItalic = 3
  %FontStyleUnderline = 4
  %FontStyleStrikeout = 8
'// 4.80 This API is to be used only with STATIC and BUTTON controls exclusively!
  DECLARE SUB skSetLabelFont LIB "WinLIFT.dll" ALIAS "skSetLabelFont" ( _
  BYVAL hCtrl AS LONG, _             ' The control handle.
  zFontName AS ASCIIZ, _             ' The GDI+ compatible font name to use.
  BYVAL nFontSize AS WORD, _         ' The font size in pixel.
  BYVAL ARGBcolor AS LONG, _         ' The ARGB color (use the skARGB() function above, or NULL to apply the skin theme color).
  BYVAL nFontStyle AS WORD _         ' One of the FontStyle constant above.       
  )

  DECLARE FUNCTION skStaticImage LIB "WinLIFT.dll" ALIAS "skStaticImage" ( _
  BYVAL hOwner AS LONG, _            ' Handle of the window parent owner.
  zFullpathImageName AS ASCIIZ, _    ' Full path name to the static image.
  BYVAL x AS LONG, _                 ' X location of the static image control.
  BYVAL y AS LONG, _                 ' Y location of the static image control.
  BYVAL W AS LONG, _                 ' Width of the static image control.
  BYVAL H AS LONG, _                 ' Height of the static image control.
  BYVAL nID AS LONG _                ' Unique ID of the static image control.
  ) AS LONG

  DECLARE SUB skSetZorder LIB "WinLIFT.dll" ALIAS "skSetZorder" ( _
  BYVAL hCtrl AS LONG, _             ' Handle of the child control.
  BYVAL UseOrder AS LONG _           ' %HWND_ constant or another child control handle.
  )

  %SK_DWM_LEFT                = 27
  %SK_DWM_TOP                 = 28
  %SK_DWM_RIGHT               = 29
  %SK_DWM_BOTTOM              = 30
  DECLARE FUNCTION skGetSystemMetrics LIB "WinLIFT.dll" ALIAS "skGetSystemMetrics" ( _
  BYVAL nMeasure AS LONG _           ' The measure to retrieve.
  ) AS LONG

'// 4.87
  DECLARE FUNCTION skGetDWMregion LIB "WinLIFT.dll" ALIAS "skGetDWMregion" ( _
  BYVAL hOwner AS LONG _             ' Handle of the window parent owner.
  ) AS LONG

'// 4.89 Main window minimum horizontal track size
  DECLARE FUNCTION MinTrackSizeX LIB "WinLIFT.dll" ALIAS "MinTrackSizeX"( _
  BYVAL SizeX AS LONG _              ' Width
  ) AS LONG

'// 4.89 Main window minimum vertical track size
  DECLARE FUNCTION MinTrackSizeY LIB "WinLIFT.dll" ALIAS "MinTrackSizeY"( _
  BYVAL SizeY AS LONG _              ' Height
  ) AS LONG

  declare function skDoNotSkinPopupMenu lib "WINLIFT.dll" alias "skDoNotSkinPopupMenu" ( _
  byval nOnOff as long, _
  byval RW as long _
  ) as long

  declare function zGetButImageBackProperty lib "WINLIFT.dll" alias "zGetButImageBackProperty" ( _
  byval hWnd as DWORD _
  ) as DWORD