CGXGridCore::EnableHints

void EnableHints(BOOL bEnable = TRUE);

bEnable

Specifies if creation of hints is desired.

Remarks

Sets an internal flag which indicates if hints should be created. A view normally needs hints; a dialog control does not need hints.

You should call EnableHints in OnInitialUpdate after executing necessary commands to set up the grid. See SetModifiedFlag for further explanation.

Call SetViewID to specifiy a unique identifier for view when you have several different grid-views attached to a document. Otherwise all views attached to the document receive hints regardless whether they display different data.

Control-Factory Specific ->

The Update-Hint mechanism has been implemented using the abstraction mechanism as discussed in the chapter "Reducing the size of your application" in the user's guide. A call to the ImplementUpdateHint method from within the control factory class' InitializeGridComponents method will make the concrete implementation of this mechanism available to your application.

If no concrete implementation is available calling EnableHints will have no effect. A warning will be displayed in the debug window.

END Control-Factory Specific

Example

CDBaseBrowserView needs hints because several views can share the parameter-object embedded in the document. OnInitialUpdate links the view to the parameter-object and forces the creation of hints.

void CDBaseBrowserView::OnInitialUpdate( )
{
   BOOL bFirstView = (GetParam( ) == NULL);
   // Link grid to document,
   SetParam(&GetDocument( )->m_param, FALSE /* do not destroy*/);
   CGXGridView::OnInitialUpdate( );
   EnableHints(TRUE);   // I have several views connected with one doc
}

See Also

 CGXGridCore::SetModifiedFlag  CGXGridCore::SetViewID

CGXGridCore

 Class Overview |  Class Members