Professional UI Solutions
Site Map   /  Register
 
 

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.

Forums » Prof-UIS Tech Support » CExtPageNavigatorWnd events Collapse All
Subject Author Date
Sergio Buonanno Apr 3, 2006 - 4:15 AM

I cannot find documentation about the events fire by CExtPageNavigatorWnd control. I would like to know which events are fired by CExtPageNavigatorWnd and information on the events parameters too.

Technical Support Apr 3, 2006 - 10:50 AM

We guess you mean the selection event and, if this is the case, just use a CExtPageNavigatorWnd::g_nMsgSelectionNotification notification. Please follow the steps below:

1. Add a declaration of the handler method to the CMainFrame header:

LRESULT OnPageNavigatorSelectionChabged( WPARAM wParam, LPARAM lParam );
2. Add the following macros to the message map:
ON_REGISTERED_MESSAGE(
            CExtPageNavigatorWnd::g_nMsgSelectionNotification,
            OnPageNavigatorSelectionChabged
            )
3. Add the implementation for this handler to CMainFrame:
LRESULT CMainFrame::OnPageNavigatorSelectionChabged(
            WPARAM wParam,
            LPARAM lParam
            )
{
            lParam;
            const CExtPageNavigatorWnd::SELECTION_NOTIFICATION * pSN =
                        CExtPageNavigatorWnd::SELECTION_NOTIFICATION::FromWPARAM( wParam );
            
            if( pSN->m_bChangedFinally )
            {
                        // selection finished
                        // pSN->m_nPageOld
                        // pSN->m_nPageNew
            }
            else
            {
                        // selection start
                        // pSN->m_nPageOld
                        // pSN->m_nPageNew
            }
            
            // return -1; do not allow to change selection
            
            return 0L;
}
The selection handling is demonstrated in the PageNavigator sample.