What is the difference between OnInitialUpdate and OnUpdate?
Answers were Sorted based on User's Feedback
Answer / adil mir ajk uni mzd
OnInitialUpdate( ) is a virtual view function Called by the
framework after the view is first attached to the document,
but before the view is initially displayed. The default
implementation of this function calls the OnUpdate member
function
OnUpdate() is called by the framework when the doc has been
modified.It is actually called by UpdateAllViews() to
reflect changes in all the views associated with the doc.
| Is This Answer Correct ? | 3 Yes | 0 No |
Both are uses for to update the view. OnInitialUpdate()
updates the view while initialization, this function called
by framework while initialization. but default
implemenation calls OnUpdate function. if the window is
resizable or it has scroll bars, use OnUpdate() to change
the scroll limits and document changes.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / krishna akkulu
Both update the view, But
OnInitialUpdate, called when the view is first created
OnUpdate, called when the document updates its views
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / priyanka
OnInitialUpdate() is called after a view is first attached
to the doc and before it gets displayed.We can override it
to put some initializations containing info abt the doc.It
calls OnUpdate().
OnUpdate() is called by the framework when the doc has been
modified.It is actually called by UpdateAllViews() to
reflect changes in all the views associated with the doc.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / jianhua wang
OnInitialUpdate( ) is a virtual view function Called by the
framework after the view is first attached to the document,
but before the view is initially displayed. The default
implementation of this function calls the OnUpdate member
function
OnUpdate( ) is a virtual view function Called by the
framework after the view's document has been modified; this
function is called by CDocument::UpdateAllViews and allows
the view to update its display to reflect those modifications.
| Is This Answer Correct ? | 0 Yes | 0 No |
Tell me the work of HTREDUCE and HTZOOM
What is document-view architecture ? Give me one real time example for SDI ?
How we call a dialog in another dialog?
1)How to create ToolTip in MFC?
What is the difference between hinsrtance and hprevinstance in WinMain function?
what message is sent to an application when the user presses the primary button?
1)why we cant create more than one instance of the class Derived from CWinApp
What is the difference between the Encapsulation and Abstraction
25 Answers HCL, Invensys, TCS, Wipro,
What is the use of message map ?
1)How to change the size of a button at run time ?
What is a message map, and what is the advantage of a message map over virtual functions?
What is the base class for most MFC classes?