<< Return to Main Index

< Return to Class Index

CGXGridCore::OnStartTracking

virtual BOOL OnStartTracking(ROWCOL nRow, ROWCOL nCol, int nTrackingMode);?

nRow

Specifies the row id.

nCol

Specifies the column id.

nTrackingMode

Specifies the tracking-mode. The mode can be either GX_TRACKWIDTH when the user is dragging column-widths and GX_TRACKHEIGHT when the user is tracking row-heights.

Return Value

FALSE if tracking is not possible; TRUE if ok.

Remarks

Overridable method which initializes the tracking-mode.

This method is called when the user has clicked the mouse on a grid line in the header.

You can override this method if you want to avoid tracking the size of a specific row or column. See CGXGridParam::EnableTrackRowHeight and CGXGridParam::EnableTrackColWidth to globally disable tracking.

Control-Factory Specific ->

This method 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 ImplementUserResizeCells method from within the control factory class' InitializeGridComponents method will make the concrete implementation of this method available to your application.

If no concrete implementation is available this method returns FALSE. No action is performed.

END Control-Factory Specific

Example

This example traces a message when the user starts tracking.

BOOL CDerGridView::OnStartTracking(WORD nRow, WORD nCol, WORD           nTrackingMode)
{
   String2 sMessage;
   Message.LoadString(IDS_TRACKING_START);
   ((CMainFrame *) (AfxGetApp( )->m_pMainWnd)->SetStatusText(sMessage);
   TRACE("User starts Tracking");
   return CGridView::OnStartTracking(nRow, nCol, nTrackingMode);
}

See Also

CGXGridCore::OnMoveTracking CGXGridCore::OnEndTracking CGXGridCore::IsTracking CGXGridParam::EnableTrackColWidth

CGXGridCore

Class Overview | Class Members