The IMAPIForm::GetViewContext method returns the current view context for the form.
See IMAPIForm : IUnknown.
HRESULT GetViewContext(
LPMAPIVIEWCONTEXT FAR * ppViewContext
);
Form viewers call GetViewContext to obtain a pointer to the view context established in a previous call to IMAPIForm::SetViewContext. If no prior call has been made to SetViewContext, GetViewContext sets ppViewContext to NULL.
Copy your form's view context pointer into the pointer passed in by the calling form viewer in the ppViewContext parameter. If your form does not have a view context, set ppViewContext to NULL.