This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

Fix for LMDTaskDialogTemplate

edited April 2013 in LMD ElPack
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

  • Hi Bernhard,

    Thank you for this observation. This change look sensible.
    I'll check and put it to SVN.

Sign In or Register to comment.