0
votes

completing the execution In my application I have a modal dialog. When clicks on a button in my dialog, it pops up modelless dialog with progress bar.

I am using worker thread for incrementing the progress bar in the modelless dialog.

In parent dialog after popping up modelless dialog, its calling an api from a dll and the main thread is busy.When the main thread( parent dialog) is busy, the worker thread is not incrementing the progress bar.If main thread is not busy then only the progress bar is getting incremented.

I tried with sending notification to main thread from worker thread using postmessage and sendmessage also... but after completing the execution of Dll API only the main thread updating the UI.

Any help is appreciated.

Thanks.

1
There's two types of progress bars. You don't mention what type you're using, or, show the appropriate code to help you. - rrirower

1 Answers

1
votes

While the main thread is busy it will not process messages. So PostMessage or SendMessage from the worker thread has to wait. The solution is to perform the busy function in the worker thread, not the main thread.