Program holds during scroll in sub window


I'm working with c++ (ms vc11) with the .Net 4.5 for windows.

I have a main form with a main loop which calculate something and display it on the form.
If I start a sub-window (f.e. open an image in a new form) and if I do something in the sub window, like button press which calculation something,... the main loop works and shows the results perfectly.

But if I take the main or sub window to move it to another place on the desktop or click on the scroll bars on the sub window the main loop holds on until the reposition is finished.

Have someone a tip?

I'm new to windows programming myself, but I would say this is happening because windows has to redraw the window where its new position is. Thus it will wait for the window to be redrawn before the message loop continues. I am not sure why this is a problem as you haven't provided a context of why this is an issue.
Last edited on
I suppose you could look into threading your program so that other tasks can be completed while current messages are being processed.
Topic archived. No new replies allowed.