Multiple choice technology programming languages

When a user changes the content of one of the views, that view object calls which of the following function?

  1. CDocument::UpdateViews

  2. CDocument::UpdateAllViews

  3. CDocument::UpdateData(TRUE)

  4. CDocument::Modify(TRUE)

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

When a view modifies data, it calls CDocument::UpdateAllViews(NULL, hint) to notify all other views of the change. This is the core of MFC's document-view architecture ensuring multiple views stay synchronized. The NULL parameter excludes the calling view from notifications.