Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Andrew Harding
|
Mar 20, 2006 - 10:46 AM
|
How do I recieve notification when a user selects a tab of a CExtTabPageContainerOneNoteWnd control?
|
|
Technical Support
|
Mar 20, 2006 - 11:39 AM
|
To catch the tab selection change event, create a CExtTabPageContainerWnd -derived class and override its OnTabWndSelectionChange() virtual method. Please note this method is called twice. The first time the bPreSelectionTest parameter is true (POINT A, see the code below) and you can return false if you want to cancel the tab selection change. When the bPreSelectionTest parameter is false , the new tab page is already active. virtual bool CYourTabPageContainerWnd::OnTabWndSelectionChange(
LONG nOldItemIndex,
LONG nNewItemIndex,
bool bPreSelectionTest
)
{
bool bRetVal =
CExtTabPageContainerWnd::OnTabWndSelectionChange(
nOldItemIndex,
nNewItemIndex,
bPreSelectionTest
);
if( bRetVal )
{
if( bPreSelectionTest )
{
/// POINT A:
/// BEFORE A NEW PAGE GETS ACTIVE
/// (the previous page window is still on the top
...
}
else
{
/// POINT B:
/// WHEN THE NEW PAGE IS ACTIVE
/// (the new page is visible)
...
}
}
return bRetVal;
}
|
|