I have created a simple dialog application in which I have a button and a status window. I have managed to properly display status messages to this status window using sendmessage when the user hits the button. However, there seem to be a timing issue when I try to go fancy...
I want it to behave like this:
When button is pressed:
- Display "Running..." as the status mesage
- Run a procedure (takes many seconds)
- Append " DONE" to the status message and display it.
When I coded this, what happens is that "Running...DONE" is displayed after the procedure is run which takes a few seconds. Nothing was displayed before the procedure started. Are the send messaged supposed to be instant? If not, is there a way I can trigger it to display it instantly?
I should add that I added these messages in the switch/case structure for the controls in the window. The main event loop contains the TranslateMessage and DispatchMessage functions. Perhaps that is the reason for the issue. I just don't know where to put my procedure so that I can get the desired functionality...