Using Delphi 2010 I have customized a TSaveDialog using the resource template approach as shown in TOpenPictureDialog in Delpi's ExtDlgs. The template approach allows me to successfully insert a form containing several controls in the system save dialog. This works fine as long as the Windows DPI setting is 96. With user defined (text) scaling or hdpi monitors the inserted form is only partly visible. This is of course due to Form.Scaled = True which causes the form plus containing controls to scale (become larger). Currently the template file ( the default as used in for example TOpenPictureDialog ) contains fixed size dialog and static text elements that define the space that will be taken up by the inserted form.
I can think of several workarounds:
- No form scaling (not really a solution for hdpi monitors)
- Provide different templates based on Screen.PixelsPerInch/96: 100% 125%, 150% 200% etc).
- Using the IFileDialogCustomize interface, but that's not really expressive enough for what I want.
The best solution would probably be a way to resize that template (based on Screen.PixelsPerInch/ 96) in memory before it gets loaded by the dialog. Is something like that available?