First you have to initialize CMDITabInfo::m_bTabCustomTooltips to true in your MainFrm::OnCreate().Then you will get AFX_WM_ON_GET_TAB_TOOLTIP on main window.
Then Handle AFX_WM_ON_GET_TAB_TOOLTIP message in the main frame by using the ON_REGISTERED_MESSAGE macro.
In the message handler function, the LPARAM will contains CMFCTabToolTipInfo pointer. you initialise CMFCTabToolTipInfo::m_strText to your tooltip text.
Go to
CMDITabInfo::m_bTabCustomTooltips for more info on