Author Topic: WinLIFT Experimental version  (Read 12578 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1996
    • zapsolution
WinLIFT Experimental version
« on: September 24, 2023, 11:06:00 pm »
The experimental version is a work in progress.
Old .sks files from version 4 should not be used with it,
some parameters are missing (causing random memory errors).

The correct .sks files to use must be those from version 5.00, with tooltip colors definition.
« Last Edit: September 24, 2023, 11:16:16 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1996
    • zapsolution
Re: WinLIFT Experimental version
« Reply #1 on: November 05, 2023, 09:34:12 am »
I am progressing slowly with verssion 6.00.

What about:
1 - Support for multiple popup application running in the same thread.
2 - ListView column drag & drop.
3 - ListView can use Private font (skSetLabelFont).
4 - PureBasic custom class detection.
5 - Code cleanup, optimization, and size reduction.
...
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1996
    • zapsolution
WinLIFT anchor properties
« Reply #2 on: November 17, 2023, 06:40:02 pm »
Here is the first WinLIFT tutor using the Experimental* Version 6.00

The code has been highly optimized to produce a tiny 124 Kb 64-bit DLL

The "Buttons" project is using only WinLIFT controls, to illustrate the concept of anchor/dock properties, that is the modern paradigm to resize child controls.

Search in the code for: skSetAnchorCtrl

The project is provided with its full VS2022 C++ source code, configured in release mode to produce a... 15 Kb binary EXE.

Being able to produce such small binary files is only possible when using the Windows FLAT API in procedural mode, and by nowadays standard it is becoming a lost art.

Note: Experimental, means work in progress...
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1996
    • zapsolution
Re: WinLIFT Experimental version
« Reply #3 on: November 19, 2023, 10:44:41 am »
Here is another C++ example (debug version) showing the use of anchor properties.

Updated version of the Resize mockup is attached to this post.

What is new:

Anchor properies using power of 2 for greater flexibility

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;


AnchorOnSize(FALSE);


Homothetic resizing

Rather than being anchored, all controls are using an homogeneous dilatation, using the initial size of the popup window as the reference ratio value of 1.0f.

HomotheticOnSize(FALSE);

Sof far, you can use either Anchor or Homothetic, but not mix them together.

« Last Edit: November 20, 2023, 02:27:20 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1996
    • zapsolution
HOMOTHETIC resize
« Reply #4 on: November 23, 2023, 10:28:55 am »
This is a new version of the Resize project.

I kept the previous post for tutorial purposes, because the HOMOTHETIC computation is now part of the WinLIFT64.dll code.

In this new version, there is no need first to use the new skAnchorID API,
because the same homothetic ratio is applied to all child controls.

Just use skUseAnchorMode(hwnd, HOMOTHETIC).
« Last Edit: November 23, 2023, 10:34:47 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)