Scaling Dialog Boxes Created with Wil Dialog and Box Commands

Started by MrLeadFoot, April 30, 2026, 11:51:06 AM

Previous topic - Next topic

MrLeadFoot

I create my own dialog boxes using both Wil Dialog and Box commands, depending upon use case, to give me more flexibility. Trouble is, they shrink and grow, as do their internal elements, to the point that at high reslutions they can become so tiny it's hard to make out what's in them, let alone read the text that shrinks inside them. Can somebody please provide some guidance on how I might get my boxes and their text elements to gracefully scale at different resolutions like the typical WinBatch Message, Pause, etc. boxes?

Thank you.

td

If by "boxes" you mean WIL Dialogs, that functionality is built in. All you need to do is add the DPI setting to the dialog template.

https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/Defining_the_Dialog.htm and

The WIL Dialog Editor can create the appropriate <DPI> values for you.

WinBatch boxes are based on virtual screen coordinates and should, therefore, adjust automagically. 

[ post edited to correct a couple of bad typos.]
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

MrLeadFoot

Quote from: td on May 01, 2026, 07:57:16 AMIf by "boxes" you mean WIL Dialogs, that functionality is built in. All you need to do is add the DPI setting to the dialog template.

https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/Defining_the_Dialog.htm and

The WIL Dialog Editor can create the appropriate <DPI> values for you.

WinBatch boxes are based on virtual screen coordinates and should, therefore, adjust automagically. 

[ post edited to correct a couple of bad typos.]
I know this is old, but can you please give me an example dialog that uses the DPI variable? Also, what is the earliest version of WinBatch+Compiler that supports this feature?

Thank you.

SMF spam blocked by CleanTalk