|
|
|
|
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 |
|
Joachim Meißner
|
Jan 6, 2010 - 7:54 AM
|
If in a CExtTreeCtrl a tooltip for an item is shown which ist not selected and one clicks with the mouse on that item, OnTreeMouseClick is not called with nClick==1 (Button released). The next click works.
|
|
Technical Support
|
Jan 11, 2010 - 5:42 AM
|
Thank you for reporting us this issue. To fix it, please update the source code for the following method:
void CExtTreeCtrl::OnTreeMouseMove( UINT nFlags, CPoint point )
{
ASSERT_VALID( this );
nFlags;
bool bTrackSelection =
( ( ( GetStyle() & TVS_TRACKSELECT ) != 0)
|| ( ( TreeGetStyleEx() & (__EXT_TREE_EX_HOVER_TREE_BOXES|__EXT_TREE_EX_HOVER_CHECK_BOXES|__EXT_TREE_EX_HOVER_RADIO_BUTTONS) ) != 0 )
)
? true: false;
if( ! bTrackSelection )
return;
bool bInfoTip = ( ( GetStyle() & TVS_INFOTIP ) != 0 ) ? true: false;
DWORD dwHitTestFlagsNew = 0;
HTREEITEM htiHoverNew = NULL;
CPoint ptScreen = point;
ClientToScreen( &ptScreen );
HWND hWndFromPoint = ::WindowFromPoint( ptScreen );
if( hWndFromPoint != NULL
&& ( hWndFromPoint == m_hWnd
|| hWndFromPoint == m_wndContentExpand.GetSafeHwnd()
)
)
htiHoverNew = TreeItemHitTest( point, dwHitTestFlagsNew );
if( htiHoverNew == m_htiHover
&& dwHitTestFlagsNew == m_dwLastHoverHitTestFlags
)
return;
if( m_htiHover != NULL )
{
CRect rcItemEntire;
TreeItemRectGet( m_htiHover, rcItemEntire, e_tirt_entire );
InvalidateRect( &rcItemEntire );
}
if( htiHoverNew != NULL )
{
if( m_htiHover != htiHoverNew )
{
CRect rcItemEntire;
TreeItemRectGet( htiHoverNew, rcItemEntire, e_tirt_entire );
InvalidateRect( &rcItemEntire );
}
if( GetCapture() != this )
SetCapture();
}
else
{
if( GetCapture() == this )
ReleaseCapture();
}
if ( htiHoverNew != NULL )
CWnd::SetCapture();
else
ReleaseCapture();
OnTreeItemSetCursor(
htiHoverNew,
dwHitTestFlagsNew
);
OnTreeItemHoverChanged(
htiHoverNew,
dwHitTestFlagsNew,
m_htiHover,
m_dwLastHoverHitTestFlags
);
m_htiHover = htiHoverNew;
m_dwLastHoverHitTestFlags = dwHitTestFlagsNew;
if( bInfoTip )
{
bool bDeactivate = true;
if( htiHoverNew != NULL )
{
CRect rcLabel;
TreeItemRectGet( htiHoverNew, rcLabel, e_tirt_label );
if( rcLabel.PtInRect( point ) )
{
CRect rcClient;
GetClientRect( &rcClient );
CWnd::RepositionBars( 0, 0xFFFF, 0, CWnd::reposQuery, &rcClient, &rcClient );
if( rcLabel.left < rcClient.left
|| rcLabel.right > rcClient.right
)
{
bDeactivate = false;
m_wndContentExpand.Activate(
rcLabel,
this,
__ECWAF_DEF_EXPANDED_ITEM_PAINTER|__ECWAF_NO_CAPTURE
|__ECWAF_PASS_WM_LBUTTONUP
|__ECWAF_PASS_WM_RBUTTONUP
|__ECWAF_PASS_WM_MBUTTONUP
);
SetTimer( __EXT_TREE_CONTROL_TIMER_ID_TRACKHOVER, 100, NULL );
}
}
}
if( bDeactivate )
m_wndContentExpand.Deactivate();
} // if( bInfoTip )
}
|
|