Author Topic: WinLIFT 64-bit 7.00 (is attached to this post)  (Read 2934 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1982
    • zapsolution
WinLIFT 64-bit 7.00 (is attached to this post)
« on: December 17, 2023, 06:21:32 pm »
WinLIFT 7.00 in action skinning a PureBasic application.

This version is able to change the skin theme on the fly,
it supports ImageList when available, and/or specific TAG to display images in a ListView.




WinLIFT 7.00 is available in either 32 or 64-bit,
as a (paypal) donate-ware Win32 DLL addon.


Note: WinLIFT 7.00 uses only UNICODE (WCHAR/WSTRINGZ) strings

The 64-bit version is attached to this post with:

Busi (folder with corresponding images theme components)
Busi.sks (Skin file parameters)
WinLIFT.h (C++ header file include)
WinLIFT64.lib (link file)
WinLIFT64.dll (the 64-bit DLL)
...
« Last Edit: January 15, 2024, 06:48:19 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1982
    • zapsolution
WinLIFT 64-bit 7.00, new API
« Reply #1 on: January 09, 2024, 01:17:49 pm »
IMPORTANT!
When using multiple skinned windows in a single project,
the main window must always be skinned first.

New constants used in Version 7.00

To be used with the new skAnchorID API

const int AT_TOP         = 1;
const int AT_LEFT        = 2;
const int AT_RIGHT       = 4;
const int AT_BOTTOM      = 8;
const int AT_TOPLEFT     = 3;
const int AT_TOPRIGHT    = 5;
const int AT_BOTTOMLEFT  = 10;
const int AT_BOTTOMRIGHT = 12;
const int AT_ALL         = 15;

const int DOCK_TOP       = 256;
const int DOCK_LEFT      = 512;
const int DOCK_RIGHT     = 1024;
const int DOCK_BOTTOM    = 2048;
const int DOCK_FILL      = 3840;


New Version 7.00 APIs

BOOL skAnchorID(HWND hWnd, UINT uID, UINT uFlag)
To anchor a specific control uID within its hWnd parent container,
using any or a combination of the above constant uFlag.

BOOL skAnchorInit(HWND hWnd)
Init/Reset Anchor properties

BOOL skAnchorResize(HWND hWnd, BOOL bRepaint)
Resize the child controls, if ever you need to resize the main hWnd window yourself.

BOOL skAnchorRemoveAll(HWND hWnd)
Remove (delete) all anchor properties for the specific hWnd handle.

long skUseAnchorMode(HWND hWnd, IN long UseMode)
Use one of the exclusive constant below.

const int CANCELMODE     = -1;
const int ANCHORMODE     = 32;
const int HOMOTHETIC     = 64;


When using ANCHORMODE, it must be used after you setup all the individual skAnchorID properties.

HOMOTHETIC is exclusive, and couldn't be inter-mixed with other properties.
All childs controls belonging to hWnd are resized using an homothetic float ratio.
The original float ratio = 1.0f, that is the size of the window when calling skSkinWindow.
(This size is also used to compute the minimum WM_GETMINMAXINFO track size).

void skSetListViewImage(WCHAR* FullPathName, long ReadWriteFlag)
A ListViewImage is a single .png bitmap composed of different icons, each one must fit within a square size being the same for all images.
To be used in conjunction with a #{TAG} message, where TAG could be any letter in the range A-Z. The TAG must be inserted directly into the string used for a specific cell.
Example of image list:


void skSetToolBarImage(WCHAR* FullPathName, long ReadWriteFlag)
Same as above but for a ToolBar control.
The TAG must be inserted directly into each tool text name.

void skGetWindowSize(IN HWND hWnd, OUT long &x, OUT long &y, OUT long &WindowWidth, OUT long &WindowHeight)
The returned parameters are converted from WinLIFT SystemMetrics into standard window coordinates, in case you want to restore the window size and location in a next session.

BOOL skSkinChange(IN WCHAR* zSkinFile)
Change the skin theme on the fly, using a full qualified path to a WinLIFT .sks file.

WinLIFT.chm
The previous WinLIFT.chm file from version 4.87 is attached to this post, the existing API have been preserved, except that all strings in Version 7.00 require the use of UNICODE (WCHAR, WSTRINGZ).
« Last Edit: February 04, 2024, 06:22:45 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)