to post a new message or reply to an existing one. If you are not registered, please
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Oct 2, 2007 - 2:38 PM
I use Prof-UIS 2.63.1.
The Help says that for CExtPageContainerWnd::OnPageContainerCaptionPressedStop :
The method is called when the mouse button has been released over the page caption.
However, it is still called when I release the mouse button outside of the page caption.
I tried with the sample : PageContainer.
If it is a correct behaviour, is there a way to know from OnPageContainerCaptionPressedStop
(overrided) if the mouse is currently hovering the page caption ?
Oct 3, 2007 - 7:36 AM
This behavior is absolutely correct. The
CExtPageContainerWnd::OnPageContainerCaptionPressedStop() virtual method notifies about the end of caption pressing tracking. The mouse can be either over the caption and outside it. This method just tells you that the user released the left mouse button that was initially pressed of the caption. The following page container control demonstrates how to determine where the mouse was released:
class CYourPageContainerWnd : public CExtPageContainerWnd
virtual void OnPageContainerCaptionPressedStop(
CExtPageContainerWnd::PAGE_ITEM_INFO * pPageInfo
ASSERT_VALID( this );
CExtPageContainerWnd::OnPageContainerCaptionPressedStop( pPageInfo );
if( ::GetCursorPos( &point ) )
ScreenToClient( &point );
CExtPageContainerWnd::HIT_TEST_INFO _pht( point );
PageHitTest( _pht );
if( ( _pht.m_dwHitTestCode & __EPCHT_ON_PAGE_CAPT_ANY ) != 0
&& _pht.m_pPageInfo == pPageInfo
::AfxMessageBox( _T("Mouse released inside caption.") );
::AfxMessageBox( _T("Mouse released outside caption.") );