It isnt Possible to use the property tdfPositionRelativeToWindow
because in LMDTaskDialogTemplate (function TaskDialogIndirect) the Taskdialog is allways created without parent.
Change
LTaskDialog := TLMDCustomTaskDialog.Create(nil);
to
if ptc.hwndParent <> 0 then
begin
Ctrl := FindControl(ptc.hwndParent);
if Ctrl is TCustomForm then
LTaskDialog := TDWCustomTaskDialog.Create(Ctrl)
else
LTaskDialog := TDWCustomTaskDialog.Create(nil);
end
else
begin
LTaskDialog := TDWCustomTaskDialog.Create(nil)
end;
Comments