mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 20:39:15 +02:00
Win32: TWin32WSSavePictureDialog: setting FOS_FORCEPREVIEWPANEON on a Vista Save dialog has no effect, so don't force setting it.
This commit is contained in:
parent
8801d4e986
commit
08f783a09a
@ -205,16 +205,10 @@ begin
|
||||
Result := inherited CreateHandle(ACommonDialog);
|
||||
if (Result = 0) or (Result = INVALID_HANDLE_VALUE) then
|
||||
Exit;
|
||||
if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) and not IsXPStyleFallBack(TOpenDialog(ACommonDialog)) then
|
||||
begin
|
||||
Dialog := IFileSaveDialog(Result);
|
||||
if Succeeded(Dialog.GetOptions(@fos)) then
|
||||
begin
|
||||
fos := fos or FOS_FORCEPREVIEWPANEON;
|
||||
Dialog.SetOptions(fos);
|
||||
end;
|
||||
end
|
||||
else
|
||||
// According to https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/ne-shobjidl_core-_fileopendialogoptions
|
||||
// FOS_FORCEPREVIEWPANEON has no effect on a save dialog.
|
||||
// So don't bother in that case
|
||||
if (not CanUseVistaDialogs(TOpenDialog(ACommonDialog))) or IsXPStyleFallBack(TOpenDialog(ACommonDialog)) then
|
||||
AddPreviewControl(ACommonDialog, LPOPENFILENAME(Result));
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user