I kinda started this in another thread but I think I better start my own instead of hijacking someone elses thread
Well..I will do my best to explain what I try to achive. I have a SDI app that is supposed to be a CAD/CAM prog. I have designed a class for getting locations from the drawing area like endpoints,centerpoints, midpoints on lines and arcs.. I want to be able to call a function in my custom class that returns XYZ coordinates. I also want to use OnMouseMove() in my custom class. But if I call the function in my class like this. m_MyClass.XYZFunction I don't get a chance to use the OnMouseMove in MyClass because XYZFunction returns right away. I could just do a forever loop but I also have some processing going on with my MyClass::OnMouseMove function so if I start spinning a loop that will take all the CPU power. So I rather use a Sleep or some sort of idle to stop XYZFunction to end before a condition in MyClass::OnMouseMove is satisfed. Did this make sense? I hope it did
~Barjor