Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Managing the Current View

As part of the default implementation of frame windows, a frame window keeps track of a currently active view. If the frame window contains more than one view, as for example in a splitter window, the current view is the most recent view in use. The active view is independent of the active window in Windows or the current input focus.

When the active view changes, the framework notifies the current view by calling its OnActivateView member function. You can tell whether the view is being activated or deactivated by examining OnActivateView's bActivate parameter. By default, OnActivateView sets the focus to the current view on activation. You can override OnActivateView to perform any special processing when the view is deactivated or reactivated. For example, you might want to provide special visual cues to distinguish the active view from other, inactive views.

A frame window forwards commands to its current (active) view, as described in Command Routing, as part of the standard command routing.

Community Additions

ADD
Show:
© 2015 Microsoft