I want to catch the tab change event of a CMFCTabCtrl. Below is the code I'm trying to do that. But it does not catch the change event.

```
BOOL SurvChatDlg::OnNotify( WPARAM wParam, LPARAM lParam, LRESULT* 
                               pResult ) 
{ 
if(((LPNMHDR)lParam)->code==TCN_SELCHANGE) 
{ 
    int i = m_TabControl.GetActiveTab();
    AfxMessageBox("Changed");
} 
return CDialog::OnNotify( wParam, lParam, pResult ); 
}

```