mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 22:19:18 +02:00
LCL-Win: Add DestroyHandle method for TWin32WSSaveDialog. Issue #23388, patch from lks.
git-svn-id: trunk@46248 -
This commit is contained in:
parent
b42d8559bf
commit
43db31159c
@ -89,6 +89,7 @@ type
|
|||||||
TWin32WSSaveDialog = class(TWSSaveDialog)
|
TWin32WSSaveDialog = class(TWSSaveDialog)
|
||||||
published
|
published
|
||||||
class function CreateHandle(const ACommonDialog: TCommonDialog): THandle; override;
|
class function CreateHandle(const ACommonDialog: TCommonDialog): THandle; override;
|
||||||
|
class procedure DestroyHandle(const ACommonDialog: TCommonDialog); override;
|
||||||
class procedure ShowModal(const ACommonDialog: TCommonDialog); override;
|
class procedure ShowModal(const ACommonDialog: TCommonDialog); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1052,6 +1053,25 @@ begin
|
|||||||
Result := CreateFileDialogHandle(TOpenDialog(ACommonDialog));
|
Result := CreateFileDialogHandle(TOpenDialog(ACommonDialog));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TWin32WSSaveDialog.DestroyHandle(const ACommonDialog: TCommonDialog);
|
||||||
|
{$ifdef UseVistaDialogs}
|
||||||
|
var
|
||||||
|
Dialog: IFileDialog;
|
||||||
|
{$endif}
|
||||||
|
begin
|
||||||
|
if ACommonDialog.Handle <> 0 then
|
||||||
|
{$ifdef UseVistaDialogs}
|
||||||
|
if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then
|
||||||
|
begin
|
||||||
|
Dialog := IFileDialog(ACommonDialog.Handle);
|
||||||
|
Dialog._Release;
|
||||||
|
Dialog := nil;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
{$endif}
|
||||||
|
DestroyFileDialogHandle(ACommonDialog.Handle)
|
||||||
|
end;
|
||||||
|
|
||||||
class procedure TWin32WSSaveDialog.ShowModal(const ACommonDialog: TCommonDialog);
|
class procedure TWin32WSSaveDialog.ShowModal(const ACommonDialog: TCommonDialog);
|
||||||
var
|
var
|
||||||
State: TApplicationState;
|
State: TApplicationState;
|
||||||
@ -1257,10 +1277,10 @@ begin
|
|||||||
// Setting root dir
|
// Setting root dir
|
||||||
{$ifdef WindowsUnicodeSupport}
|
{$ifdef WindowsUnicodeSupport}
|
||||||
if UnicodeEnabledOS then
|
if UnicodeEnabledOS then
|
||||||
SendMessageW(hwnd, BFFM_SETSELECTIONW, ULONG(True), lpData)
|
SendMessageW(hwnd, BFFM_SETSELECTIONW, WPARAM(True), lpData)
|
||||||
else
|
else
|
||||||
{$endif}
|
{$endif}
|
||||||
SendMessage(hwnd, BFFM_SETSELECTION, ULONG(True), lpData);
|
SendMessage(hwnd, BFFM_SETSELECTION, WPARAM(True), lpData);
|
||||||
//BFFM_SELCHANGED
|
//BFFM_SELCHANGED
|
||||||
// : begin
|
// : begin
|
||||||
// if Assigned(FOnSelectionChange) then .....
|
// if Assigned(FOnSelectionChange) then .....
|
||||||
|
Loading…
Reference in New Issue
Block a user