Solved

Using CProgressCtrl and a Cancel Button

Posted on 1999-01-20
1
280 Views
Last Modified: 2013-11-20
I am trying to create a dialog that is very similar to a standard windows progress dialog.  On my dialog, I have a cancel button.  How can I perform a continuous action upon opening the dialog until the user presses the cancel button?  I have tried using PeekMessage but can't seem to get the application to Yield.  I currently have a processing loop in the Timer so that I can start the timer after the dialog is initialized and displayed.  Is there somewhere else I should be doing the processing?  How do I allow the cancel button to be pressed while in my processing loop and then detect that it was pressed?  Thanks in advance for any input!
0
Comment
Question by:selen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
luisr earned 100 total points
ID: 1328062
Some time ago I developed a little framework for doing this. I never released it, but I'm willing to share it to you. Send e-mail to me at luisr@iname.com if you are interested.

The way it works is that you create the dialog on the main thread and creates a new thread for the code that can be canceled. It's very simple to use.

I think this little framework is exactly what you need.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
centeredAverage challenge 8 186
wordcount challenge 11 163
Not needed 13 133
I could not set window to top 4 60
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question