Dear Technical Team,
I have created 2bars which are derived from CExtControlBar in the application and override this method:
void CExtControlBar::OnNcAreaButtonsReinitialize()
{
INT nCountOfNcButtons = NcButtons_GetCount();
if( nCountOfNcButtons > 0 )
return;
NcButtons_Add( new CExtBarNcAreaButtonClose(this) );
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
NcButtons_Add( new CExtBarNcAreaButtonAutoHide(this) );
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
// NcButtons_Add( new CExtBarNcAreaButtonExpand(this) );
// NcButtons_Add( new CExtBarNcAreaButtonMenu(this) );
}
In it, I replace the line:
NcButtons_Add( new CExtBarNcAreaButtonClose(this) );
with
NcButtons_Add( new CMyNcAreaButtonClose(this) );
class named CMyNcAreaButtonClose
derive from CExtBarNcAreaButtonClose
,and then override the OnNcAreaClicked()
method to catch mouse-click events.
But I met a problem is.
If there bars aren’t in tab group, means maybe one bar at left side, the other at right side. The method named OnNcAreaClicked() will
be invoked when the user click the close button(’X’) to close the bars.
But if there bars in tab group, means both bars at left side or right side. the method named OnNcAreaClicked() will not be invoked.
What’s the matter?
At this situation, How can I catch mouse-click event?
Thank you in advance.
Best regards,
Mike Mai