• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Latest C++ WinLIFT.DLL version: 5.00

Started by Patrice Terrier, December 03, 2013, 11:10:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrice Terrier

WinLIFT 5.00 (UNICODE version).

Both 32-bit and 64-bit are attached to this post.

Note: these versions have been compiled with VS2010 (for smaller size purpose)

You will find in this section several WinLIFT/GDImage projects,
written specifically to ensure that the C++ version works like the original 32-bit ANSI version (PowerBASIC).

However this is still a work in progress...

WinLIFT.h header:#include <windows.h>
using namespace std;

//#define C_IMPORT extern "C" __declspec(dllimport)

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

const int SK_METRICFIRST      = 0;
const int SK_CYCAPTION        = SK_METRICFIRST;
const int SK_CYMENU           = 1;
const int SK_CYSTATUS         = 2;
const int SK_CXFRAMELEFT      = 3;
const int SK_CXFRAMERIGHT     = 4;
const int SK_CYFRAMETOP       = SK_CYCAPTION;
const int SK_CYFRAMEBOTTOM    = 5;
const int SK_CXSIZE           = 6;
const int SK_CYSIZE           = 7;
const int SK_CXSYSBUT         = 8;
const int SK_CYSYSBUT         = 9;
const int SK_CXCAPTEXT        = 10;
const int SK_CYCAPTEXT        = 11;
const int SK_XBUT3DBORDER     = 12;
const int SK_YBUT3DBORDER     = 13;
const int SK_CXSYSICON        = 14;
const int SK_CYSYSICON        = 15;
const int SK_CXSYSLED         = 16;
const int SK_CYSYSLED         = 17;
const int SK_TRANSLUCENCY     = 18;
const int SK_MENUTRANSLUCENCY = 19;
const int SK_PAINT_BORDER     = 20;
const int SK_PAINT_BACKGROUND = 21;
const int SK_ICONSIZE         = 22;
const int SK_OUTER_GLOW       = 23;
const int SK_SKIN_ICON        = 24;
const int SK_DWM_AERO         = 25;
const int SK_DWM_LEFT         = 26;
const int SK_DWM_TOP          = 27;
const int SK_DWM_RIGHT        = 28;
const int SK_DWM_BOTTOM       = 29;
const int SKMETRIC_UB         = 30;

enum FontStyle {
    FontStyleRegular    = 0,
    FontStyleBold       = 1,
    FontStyleItalic     = 2,
    FontStyleBoldItalic = 3,
    FontStyleUnderline  = 4,
    FontStyleStrikeout  = 8
};

C_IMPORT HWND     skPopupOwner (IN HWND hWnd);
C_IMPORT HFONT    skCaptionFont ();
C_IMPORT HFONT    skFont ();
C_IMPORT HFONT    skFontBold ();
C_IMPORT HFONT    skFontDlg ();
C_IMPORT LONG_PTR skCaptionFontPlus ();
C_IMPORT LONG_PTR skFontPlus ();
C_IMPORT LONG_PTR skFontBoldPlus ();
C_IMPORT LONG_PTR skFontDlgPlus ();
C_IMPORT void     skSkinDisable (IN HWND hWnd);
C_IMPORT void     skSetZorder (IN HWND hWnd, IN HWND UseOrder);
C_IMPORT HDC      skGetHdcMemBmp (IN HWND hOwner);
C_IMPORT long     skARGB (IN BYTE A, IN BYTE R, IN BYTE G, IN BYTE B);
C_IMPORT void     ComputeAspect (IN long xPic, IN long yPic, IN long xCell, IN long yCell, OUT long &xP, OUT long &yP, OUT long &xS, OUT long &yS);
C_IMPORT void     skChildOffset (IN HWND hWnd, OUT long &ofX, OUT long &ofY);
C_IMPORT void     skSetLabelFont (IN HWND hCtrl, IN WCHAR* zFontName, IN WORD nFontSize, IN long ARGBcolor, IN WORD nFontStyle);
C_IMPORT long     MinTrackSizeX (IN long SizeX);
C_IMPORT long     MinTrackSizeY (IN long SizeY);
C_IMPORT WCHAR*   skVersion ();
C_IMPORT long     skInitEngine (IN WCHAR* zSkinFile, IN WCHAR* zUserKey);
C_IMPORT long     skSetAnchorCtrl (IN HWND hWnd, IN long AnchorMode);
C_IMPORT long     skUsingDWM ();
C_IMPORT WCHAR*   skSkinFolder ();
C_IMPORT HWND     skButImage (IN HWND hOwner, OUT HBITMAP hBitmap, IN long xLeft, IN long yLeft, IN long ButID);
C_IMPORT WCHAR*   skAuthor ();
C_IMPORT HWND     skBorder (IN HWND hWnd, IN long x, IN long y, IN long xW, IN long yH, IN long nID, IN long nBorder);
C_IMPORT void     skSkinChildCtrl (IN HWND hWnd, IN long RedrawFlag);
C_IMPORT void     skSkinEnable (IN HWND hWnd);
C_IMPORT void     skRedrawMenuBar(IN HWND hWnd);
C_IMPORT HMENU    skGetMenu (IN HWND hWnd);
C_IMPORT HWND     skMenuContainer (IN HWND hWnd);
C_IMPORT void     skSkinWindowUpdate (IN HWND hWnd, IN long RedrawFlag);
C_IMPORT long     skSkinWindow (IN HWND hWnd, WCHAR* zSysButTip);
C_IMPORT HWND     skCreateDW (IN HWND hParent);
C_IMPORT void     skDestroyDW (OUT HWND &hDW);
C_IMPORT long     skDialogAlert (IN WCHAR* zCaption, IN WCHAR* zMessage, IN WCHAR* zButton);
C_IMPORT long     skDialogError (IN WCHAR* zCaption, IN WCHAR* zMessage, IN WCHAR* zButton);
C_IMPORT long     skDialogInfo (IN WCHAR* zCaption, IN WCHAR* zMessage, IN WCHAR* zButton);
C_IMPORT long     skDialogYesNo (IN WCHAR* zCaption, IN WCHAR* zMessage, IN WCHAR* zButton);
C_IMPORT WCHAR*   skDialogInput (IN WCHAR* zCaption, IN WCHAR* zMessage, IN WCHAR* zButton);
C_IMPORT HWND     skButtonImage (IN HWND hOwner, IN WCHAR* zFullpathImageName, IN long x, IN long y, IN long ButID, IN long StateMax);
C_IMPORT HWND     skPushButtonImage (IN HWND hOwner, IN WCHAR* zFullpathImageName, IN WCHAR* zLabel, IN long x, IN long y, IN long xW, IN long yH, IN long ButID, IN long Alignment);
C_IMPORT void     skSetToolTipText (IN HWND hObj, IN WCHAR* zText);
C_IMPORT WCHAR*   skGetToolTipText (IN HWND hObj);
C_IMPORT HWND     skCreateToolTip (IN HWND hObj, IN WCHAR* zText);
C_IMPORT void     skRemoveToolTip (IN HWND hObj);
C_IMPORT HWND     skClockCtrl (IN HWND hOwner, IN WCHAR* zFullpathImageName, IN long x, IN long y, IN long w, IN long h, IN long nID, IN long ARGB1, IN long ARGB2, IN long GMT);
C_IMPORT long     skComputeAngleFromPoint(IN HWND hWnd, IN long mX, IN long mY);
C_IMPORT void     skGaugeSetMinMax (IN HWND hCtrl, IN long nMin, IN long nMax);
C_IMPORT void     skGaugeGetMinMax (IN HWND hCtrl, OUT long &nMin, OUT long &nMax);
C_IMPORT void     skGaugeSetPos (IN HWND hCtrl, IN long nPos, IN long RedrawFlag);
C_IMPORT long     skGaugeGetPos (IN HWND hCtrl);
C_IMPORT HWND     skKnobGauge (IN HWND hOwner, IN WCHAR* zFullpathImageName, IN long x, IN long y, IN long w, IN long h, IN long ButID, IN long MinValue, IN long MaxValue, IN long UsePos, IN long StateMax);
C_IMPORT HWND     skStaticImage (IN HWND hOwner, WCHAR* zFullpathImageName, IN long x, IN long y, IN long w, IN long h, IN long nID);
C_IMPORT HWND     skGetDWMregion (IN HWND hWnd);
C_IMPORT long     skGetSystemMetrics (IN long nMeasure);
C_IMPORT HBITMAP  skSkiToDib (IN WCHAR* szFile, OUT long &nReserved);
C_IMPORT long     skTerminateProcess (IN WCHAR* szModule);
C_IMPORT void     skPaintBrushBitmap (IN HDC hDC, IN long x, IN long y, IN long nWidth, IN long nHeight, IN long ARGBcolor);


...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Peter Weis

Hello Patrice,
property the Include file thus changed the/that it runs with PBWin 10 and PowerBasic Console compiler


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

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

' The main function to skin a window
  DECLARE FUNCTION skSkinWindow LIB "WinLIFT32.dll" ALIAS "skSkinWindow" ( _
  BYVAL hWnd AS LONG, _              ' Handle of the popup window you want to skin.
  zSysButTip AS WSTRINGZ _             ' 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 "WinLIFT32.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 "WinLIFT32.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 "WinLIFT32.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 "WinLIFT32.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 "WinLIFT32.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 "WinLIFT32.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 "WinLIFT32.dll" ALIAS "skMenuContainer" (BYVAL hWnd&) AS LONG
'****************************************************************************
'*                           END OF SKINNED MENU                            *
'****************************************************************************

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

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

  DECLARE FUNCTION skVersion LIB "WinLIFT32.dll" ALIAS "skVersion" () AS WSTRING

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

  DECLARE FUNCTION skButtonImage LIB "WinLIFT32.dll" ALIAS "skButtonImage" (BYVAL hOwner AS LONG, zFullpathImageName AS WSTRINGZ, BYVAL x AS LONG, BYVAL y AS LONG, BYVAL ButID AS LONG, BYVAL StateMax AS LONG) AS LONG
  DECLARE FUNCTION skBorder LIB "WinLIFT32.dll" ALIAS "skBorder" ( _
  BYVAL hCtrl AS LONG, _             ' Handle of the child control.
  BYVAL x AS LONG, _                 ' X location of the border.
  BYVAL y AS LONG, _                 ' Y location of the brder.
  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 size of the border.
  ) AS LONG

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

  DECLARE FUNCTION skPushButtonImage LIB "WinLIFT32.dll" ALIAS "skPushButtonImage" ( _
  BYVAL hOwner AS LONG, _            ' Handle of the window parent owner.
  zFullpathImageName AS WSTRINGZ, _    ' Full path name to the image shown on button.
  zLabel AS WSTRINGZ, _                ' 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

  DECLARE FUNCTION skSkinFolder LIB "WinLIFT32.dll" ALIAS "skSkinFolder" () AS WSTRING


' // 4.73 Animated clock control
  DECLARE FUNCTION skClockCtrl LIB "WinLIFT32.DLL" ALIAS "skClockCtrl" ( _
  BYVAL hOwner AS LONG, _            ' Handle of the window parent owner.
  zFullpathImageName AS WSTRINGZ, _    ' 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 "WinLIFT32.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 "WinLIFT32.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 "WinLIFT32.dll" ALIAS "skKnobGauge" ( _
  BYVAL hOwner AS LONG, _            ' Handle of the window parent owner.
  zFullpathImageName AS WSTRINGZ, _    ' 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 "WinLIFT32.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 "WinLIFT32.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 "WinLIFT32.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 "WinLIFT32.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 "WinLIFT32.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 "WinLIFT32.dll" ALIAS "skSetLabelFont" ( _
  BYVAL hCtrl AS LONG, _             ' The control handle.
  zFontName AS WSTRINGZ, _             ' 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 "WinLIFT32.dll" ALIAS "skStaticImage" ( _
  BYVAL hOwner AS LONG, _            ' Handle of the window parent owner.
  zFullpathImageName AS WSTRINGZ, _    ' Full path name to the frame image.
  BYVAL x AS LONG, _                 ' X location of the frame control.
  BYVAL y AS LONG, _                 ' Y location of the frame control.
  BYVAL W AS LONG, _                 ' Width of the frame control.
  BYVAL H AS LONG, _                 ' Height of the frame control.
  BYVAL nID AS LONG _                ' Unique ID of the frame control.
  ) AS LONG

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




greetings Peter

Patrice Terrier

Peter--

The include you posted is not accurate, ALL strings should be converted to WSTRINGZ, and a couple of functions do not have the same number of parameters.

So far i would recommend to PowerBASIC users to keep using the PowerBASIC version.


The C++ version is to be used with a 64-bit compiler, and the specs could change in the future.
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

#3
In order to use Tooltip

You must first init the common controls from your code, before calling WinLIFT or GDImage.

// Enable tooltip
#pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")


See the HUD controls 64-bit demo source code, here:
http://www.jose.it-berater.org/smfforum/index.php?topic=4896.0

Note: This is also true for the PowerBASIC version when using the SDK coding style.
...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

The first post of this thread has been updated with the latest UNICODE version for 32 and 64-bit.

Note: The WinLIFT.h header has been updated as well.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com