Capturing Mouse Input to a modeless dialog box
Posted on 1999-07-21
In my application, selection of specific menu items causes the app to display two dialog boxes -- one for user selection of commands and one to display data. In certain instances the user may wish to continuously retrieve data (activated by clicking on a button the "control" dialog box). At this point the app must enter some type of loop that continuously retrieves the data (CDataRetrieve::OnRepeatRetrieve() ). Once the app enters the loop the user must click on a "Stop Retrieve" button to cancel the continous data retrieval. How can I program the app to stay in the loop while still:
a) allowing the user to left click on the "Stop Retrieve" button; and
b) ignoring any other messages (mouse movement, right click, keyboard entry, ...)
I don't need specific code examples unless it's the easiest way to describe the solution. I just need to know the best way to implement this type of loop.
Thanks in advance!