if(pMsg->message == WM_MOUSEMOVE && pMsg->hwnd == m_cTabCtrl.m_hWnd)
{
CPoint point(LOWORD(pMsg->lParam),HIWORD(pMsg->lParam));
TCHITTESTINFO TestInfo;
TestInfo.pt = point;
int iTabNum = m_cTabCtrl.HitTest(&TestInfo);
if (iTabNum != -1 )
{
TCITEM item;
char ItemText[255];
item.mask = TCIF_TEXT;
item.pszText = ItemText;
item.cchTextMax = 255;
m_cTabCtrl.GetItem( iTabNum, &item );
TRACE( "OnTab: %s/n", ItemText );
}
}
void CToolTipTestDlg::OnMouseMove(UINT nFlags, CPoint point)
{
char * TabName[] = { "About", "Info" };
for ( int i = 0; i < 2; i++ ) {
CRect rect; m_cTabCtrl.GetItemRect( i, &rect );
if ( rect.PtInRect( point ) )
TRACE( "On %s/n", TabName[i] );
}
{
CPoint point(LOWORD(pMsg->lParam),HIWORD(pMsg->lParam));
TCHITTESTINFO TestInfo;
TestInfo.pt = point;
int iTabNum = m_cTabCtrl.HitTest(&TestInfo);
if (iTabNum != -1 )
{
TCITEM item;
char ItemText[255];
item.mask = TCIF_TEXT;
item.pszText = ItemText;
item.cchTextMax = 255;
m_cTabCtrl.GetItem( iTabNum, &item );
TRACE( "OnTab: %s/n", ItemText );
}
}
void CToolTipTestDlg::OnMouseMove(UINT nFlags, CPoint point)
{
char * TabName[] = { "About", "Info" };
for ( int i = 0; i < 2; i++ ) {
CRect rect; m_cTabCtrl.GetItemRect( i, &rect );
if ( rect.PtInRect( point ) )
TRACE( "On %s/n", TabName[i] );
}