Second question: The return value tells you only that dialog was shown correctly. TaskDialog can have many different possible return values. Check the result properties instead:
if LMDTaskDialog1.execute then ShowMessage(IntToStr(LMDTaskDialog1.ResultRadioButtonId)) ;
You want result of command buttons, not radio buttons. Use ResultButtonId instead. Return values are Modalresult values like mrOK for common buttons or userdefined values you have set in Buttons collection.
Comments
bExit :=LMDTaskDialog1.Execute ;
if bExit then ShowMessage('OK') else ShowMessage('no');
Why is bExit True for both OK & No ?
Have just checked but there is no such TaskDialog Demos in the LMD SE :-(
Can you assist ?
Thank you.
I tried
if LMDTaskDialog1.execute then
ShowMessage(IntToStr(LMDTaskDialog1.ResultRadioButtonId)) ;
The LMDTaskDialog1 has 2 buttons, Ok & Cancel. The return value is 0 for both buttons.
I need to know which button is clicked to process the results of the btn click
Thank you
[Error] d_LMDTaskDlg.pas(157): Types of actual and formal var parameters must be identical
if LMDTaskDialog1.execute then
ShowMessage(IntToStr(LMDTaskDialog1.ResultRadioButtonId)) ;
if LMDTaskDialog1.execute then
ShowMessage(IntToStr(LMDTaskDialog1.ResultButtonId))
works :-) Yes returns 1 and No returns 7
Thanx