News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

New resizer discussion

Started by John Z, November 17, 2025, 12:01:10 PM

Previous topic - Next topic

TimoVJL

Proves, that generic resizer code might be difficult and needs lot of code.
May the source be with you

John Z

#16
Quote from: TimoVJL on November 24, 2025, 02:05:33 PMProves, that generic resizer code might be difficult and needs lot of code.


Indeed it does.  Still working to improve it. Standard controls seem to be handled fairly well now, but still need more testing. Library is about 11k for now.

A simple "custom" control on the window works - just need to create it BEFORE calling Init_resize - that was my mistake it was after and I finally realized it. 

Tested Owner-Draw of a simple text box it worked also!

The attachment is just a demo of the resizer in action.  New code for the library will be posted soon.  Open issues (but not blocks to using) are window glitching a bit if specified "LIMIT_SHRINK = TRUE" but trying to drag smaller for Main Dialog - just does not look nice.  Second, still working on a maintain w/h ratio option, a nice to have IMO.  Otherwise, to me, it is looking close to being completed. 

John Z

Tester and library source code now posted under User Contributions -
https://forum.pellesc.de/index.php?topic=11682.0

John Z

Here is an early look at adding 'Auto Font Sizing' to the resizer library.

Still has some, maybe many, issues to work out but is a working preview.  Just don't know how much interest there would be in having this feature.  Is nice for visually impaired as full screen window has big text.

To test click the "Toggle Auto Font" button in lower right, then drag the window larger or smaller to see effects. Toggling 'Button resize' will also inhibit font resize for buttons since the button is not larger.

A few obvious issues: not working with custom control, Owner Draw sometimes double vision, restore of original is not yet implemented well.  Not implemented globally yet so not for the child windows in this tester.

Just the tester at this point - no sources

John Z

Still just same three functions -