I have a MFC code based on Document View framework. I use UpdateAllViews(nullptr,0,nullptr) from Document class to invoke the View's OnDraw member function.
void MyDocumentClass::MyFunction()
{
//.. Document code to create and process data
UpdateAllViews(nullptr,0,nullptr) // Invokes OnDraw
// When does program control reach this line?
}
My question is, please tell me if the UpdateAllViews function is blocking or non blocking, when does program control reach the line next to UpdateAllViews()? Does it reach there after all the code in OnDraw() has finished executing, or does it reach there sooner?
UpdateAllViews is a nonblocking function that simply calls OnUpdate of each view. The OnUpdate function typically invalidates the view, which will cause OnDraw later. UpdateAllViews returns after the invalidating and before the painting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With