mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-15 09:40:45 +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 UTF8StringToPWideChar(const s: string) : PWideChar;
|
||||||
function UTF8StringToPAnsiChar(const s: string) : PAnsiChar;
|
function UTF8StringToPAnsiChar(const s: string) : PAnsiChar;
|
||||||
|
|
||||||
|
{$ifdef UseVistaDialogs}
|
||||||
|
function CanUseVistaDialogs(const AOpenDialog: TOpenDialog): Boolean;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
function SaveApplicationState: TApplicationState;
|
function SaveApplicationState: TApplicationState;
|
||||||
|
@ -171,7 +171,8 @@ var
|
|||||||
begin
|
begin
|
||||||
Result := inherited CreateHandle(ACommonDialog);
|
Result := inherited CreateHandle(ACommonDialog);
|
||||||
{$ifdef UseVistaDialogs}
|
{$ifdef UseVistaDialogs}
|
||||||
if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then
|
//if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then
|
||||||
|
if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then
|
||||||
begin
|
begin
|
||||||
Dialog := IFileOpenDialog(Result);
|
Dialog := IFileOpenDialog(Result);
|
||||||
if Succeeded(Dialog.GetOptions(@fos)) then
|
if Succeeded(Dialog.GetOptions(@fos)) then
|
||||||
@ -217,7 +218,8 @@ var
|
|||||||
begin
|
begin
|
||||||
Result := inherited CreateHandle(ACommonDialog);
|
Result := inherited CreateHandle(ACommonDialog);
|
||||||
{$ifdef UseVistaDialogs}
|
{$ifdef UseVistaDialogs}
|
||||||
if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then
|
//if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then
|
||||||
|
if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then
|
||||||
begin
|
begin
|
||||||
Dialog := IFileSaveDialog(Result);
|
Dialog := IFileSaveDialog(Result);
|
||||||
if Succeeded(Dialog.GetOptions(@fos)) then
|
if Succeeded(Dialog.GetOptions(@fos)) then
|
||||||
|
Loading…
Reference in New Issue
Block a user