Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CMFCTabToolTipInfo::m_nTabIndex

 

Specifies the index of the tab control.

int m_nTabIndex;

Index of the tab over which the user is hovering.

Example

The following example shows how m_nTabIndex is used in the MDITabsDemo Sample: MFC Tabbed MDI Application.

LRESULT CMainFrame::OnGetTabToolTip(WPARAM /*wp*/, LPARAM lp)
{
	CMFCTabToolTipInfo* pInfo = (CMFCTabToolTipInfo*) lp;
	ASSERT (pInfo != NULL);

	if (pInfo)
	{
		ASSERT_VALID (pInfo->m_pTabWnd);
		if (!pInfo->m_pTabWnd->IsMDITab ())
		{
			return 0;
		}
		pInfo->m_strText.Format (_T("Tab #%d Custom Tooltip"), pInfo->m_nTabIndex + 1);
	}

	return 0;
}

Requirements

Header: afxbasetabctrl.h

Show: