Click here to Skip to main content
15,124,861 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
i am using CTaskDialog to develop a window progress bar with cancel button on it.

I am not finding documentation on it. i'd like to know if it's possible intercept / use an OnCancel event to stop in progress operation.

i am very curious of it.

Thanks in advance for you time

What I have tried:

I have implemented with success OnInit and Ontimer and i can terminate the window when the progress reach 100% miss only Oncancel event
Posted
Updated 13-Jul-21 7:40am
Comments
jeron1 13-Jul-21 11:52am
   
Are you in a blocking function that updates the progress bar? Sounds like you're not processing windows messages. Showing code would help.

1 solution

Add a Cancel button to the dialog and use the OnCommandControlClick[^] event to handle it.
   
Comments
Drakesal 13-Jul-21 13:29pm
   
Perfect you helped me very much, last question where i can get the ID list for CANCEL button?
Richard MacCutchan 14-Jul-21 3:53am
   
The ID for any resource is just a number that you create. If you open the resource editor in Visual Studio you can browse the existing values that are being used. Or you can use the standard value: IDCANCEL, which is defined in WinUser.h.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900