Original Post
Probably an easy question, I just am not sure how to go about it, since I've never done this before. Programming with Win32 API. I have a rather long function that takes about 3 to 5 minutes to finish calculation. I want the program to continue to respond to minimize, movement of the window, and the ability to cancel the function but stay inside the program. Preferably you hit a menu button, then a window pops up while the calculations are going with a cancel button. You hit cancel, and the function does its necessary cleanup and ends before it finished. Does this involve creating a DialogBox in a separate thread and upon EndDialog, I call SendNotifyMessage, my function polls for messages every once in a while, and when it gets the message it quits? Or am I completely wrong?