Dialog Box Busy


My dialog application uploads a file to a microprocessor system through an RS-232 port.
Clicking a button starts uploading.
While running the application is not accepting any button clicks.
A progress bar is following the upload procedure.

The problem is that very often the progress bar freezes and the cursor turns to a sand clock. The process always goes to the end and eventually the progress bar gets completed but meanwhile everything stays frozen.
The same happens if the user tries to move the dialog while running or change the focus out of the dialog.

Does anybody know how to fix similar issues?

It sounds like you're not doing the actual upload in the background. You should, and have the upload thread post updates to the GUI thread periodically with its status.
How can I separate the uploading thread?
I found a temporary solution by adding the line "PeekMessage(&msg, NULL, 0, 0);" inside the upload processing loop and the Progress Bar is no longer freezing.

Topic archived. No new replies allowed.