Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Fix for LMDTaskDialogTemplate

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

Sign In or Register to comment.