mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 05:00:53 +02:00
Win32: Use Vista dialogs independant from status of ThemesEnabled also for Open/SavePicturDialog. Issue #0026940.
git-svn-id: trunk@48301 -
This commit is contained in:
parent
4b6ad199fd
commit
53911c79b5
@ -156,6 +156,10 @@ procedure RestoreApplicationState(AState: TApplicationState);
|
||||
function UTF8StringToPWideChar(const s: string) : PWideChar;
|
||||
function UTF8StringToPAnsiChar(const s: string) : PAnsiChar;
|
||||
|
||||
{$ifdef UseVistaDialogs}
|
||||
function CanUseVistaDialogs(const AOpenDialog: TOpenDialog): Boolean;
|
||||
{$endif}
|
||||
|
||||
implementation
|
||||
|
||||
function SaveApplicationState: TApplicationState;
|
||||
|
@ -171,7 +171,8 @@ var
|
||||
begin
|
||||
Result := inherited CreateHandle(ACommonDialog);
|
||||
{$ifdef UseVistaDialogs}
|
||||
if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then
|
||||
//if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then
|
||||
if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then
|
||||
begin
|
||||
Dialog := IFileOpenDialog(Result);
|
||||
if Succeeded(Dialog.GetOptions(@fos)) then
|
||||
@ -217,7 +218,8 @@ var
|
||||
begin
|
||||
Result := inherited CreateHandle(ACommonDialog);
|
||||
{$ifdef UseVistaDialogs}
|
||||
if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then
|
||||
//if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then
|
||||
if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then
|
||||
begin
|
||||
Dialog := IFileSaveDialog(Result);
|
||||
if Succeeded(Dialog.GetOptions(@fos)) then
|
||||
|
Loading…
Reference in New Issue
Block a user