RRUZ / vcl-styles-utils

Extend and improve the Delphi VCL Styles
https://theroadtodelphi.wordpress.com/
329 stars 115 forks source link

TSaveDialog problem #302

Open aivarsi opened 1 year ago

aivarsi commented 1 year ago

When TSaveDialog is used with ofOverwritePromt in Options, the message box that warns about overwriting the existing file is in the wrong size. I tested it using ThemedSysControls demo application, I just added TSaveDialog in addition to the other dialogs and enabled its ofOverWritePrompt property. Now when you select an existing file in the save dialog, it says "file.ext already exists. Do you want to replace it?". Unfortunately this dialog is not high enough and the Yes/No buttons are cut off. This happens in all themes except "Windows".

savedialog

aivarsi commented 6 months ago

Additional Information on the Window Sizing Issue:

Upon further investigation, it appears the issue is linked to the handling of the WM_SHOWWINDOW message within Vcl.Styles.Utils.Forms.

Key Observation: The variable DX, used for adjusting the window size, is calculated to an excessively large negative value. This miscalculation significantly diminishes the final window dimensions.

Recommendation:

A review of the DX calculation logic during the WM_SHOWWINDOW message processing may be necessary to correct the window size reduction issue.