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 |
|
Offer Har
|
Aug 25, 2008 - 12:51 PM
|
Dear support, This is a bug I reported a couple of months ago in 2.83, which was not there in 2.82, even sent you a clip showing how in 2.83, you can get to a scenario in which you resize a flating bar, the mouse cursor and the the dragged window frame are not at the same location, which is very confusing. I will send you via mail two things:
1. The clip to refresh your memory
2. A sample application that reproduce this problem After compiling (in debug) and running the application do this: 1. Open 10 documents (each one moves a blue square on a red background)
2. Tile them
3. Group the 3 floating dialogs together into one tab.
4. Detach one of the dialog from the tab
5. Quickly resize it’s bottom frame to make it higher. You’ll see that the frame of the bar and the mouse are not at the same position. Please let me know if you have any problems reproducing it, and please fix for 2.84, this bug prevented us from swithcing to 2.83 Thanks
Ron. This is a screenshot from the application when the bug happens: 
|
|
Technical Support
|
Aug 26, 2008 - 1:10 PM
|
It looks like we fixed this problem. Thank you. Please update the source code for the following method: void CExtMiniDockFrameWnd::_ResizingStart(
UINT nHitTest,
const CPoint & point
)
{
ASSERT( m_nResizingMode == HTNOWHERE );
ASSERT( IsWindowVisible() );
CPoint pointCurrentCursorPos = point;
ScreenToClient( &pointCurrentCursorPos );
CExtPopupMenuWnd::CancelMenuTracking();
CWnd::CancelToolTips();
CExtControlBar * pExtBar = GetControlBarExt();
ASSERT_VALID( pExtBar );
if( ! pExtBar->_FloatStateChangingIsEnabled( pExtBar ) )
return;
if( ( ! pExtBar->_IsShowContentWhenDragging() ) && pExtBar->IsFixedMode() )
{
m_nResizingMode = HTNOWHERE;
pExtBar->m_pDockContext->StartResize(nHitTest, point);
return;
}
switch( nHitTest )
{
case HTLEFT:
case HTRIGHT:
case HTTOP:
case HTTOPLEFT:
case HTTOPRIGHT:
case HTBOTTOM:
case HTBOTTOMLEFT:
case HTBOTTOMRIGHT:
m_nResizingMode = nHitTest;
break;
default:
return;
}
#ifdef _DEBUG
int nPos = 1;
CControlBar * pDebugDummyBar = NULL;
while( pDebugDummyBar == NULL && nPos < m_wndDockBar.m_arrBars.GetSize() )
pDebugDummyBar = reinterpret_cast < CExtDockBar & > ( m_wndDockBar ) . GetDockedControlBar( nPos++ );
ASSERT( pDebugDummyBar != NULL );
ASSERT_KINDOF( CExtControlBar, pDebugDummyBar );
ASSERT( pDebugDummyBar->m_pDockContext != NULL );
ASSERT( (m_wndDockBar.m_dwStyle & CBRS_FLOAT_MULTI) == 0 );
#endif
ASSERT( pExtBar == pDebugDummyBar );
ASSERT( pExtBar->m_pDockContext != NULL );
if( ! pExtBar->IsFixedMode() )
ModifyStyle( __REMOVED_NONFIXMODE_STYLES, 0 );
BringWindowToTop();
CExtMouseCaptureSink::SetCapture( GetSafeHwnd() );
GetWindowRect( &m_rcWndResizingStart );
HWND hWndExtBar = pExtBar->m_hWnd;
pExtBar->OnControlBarPositionChange( pExtBar, CExtControlBar::__ECBPC_FLOATING_FRAME_RESIZING, true, false );
_ResizingUpdateState( pointCurrentCursorPos );
pExtBar->OnControlBarPositionChange( pExtBar, CExtControlBar::__ECBPC_FLOATING_FRAME_RESIZING, false, false );
while( m_nResizingMode != HTNOWHERE )
{
::WaitMessage();
MSG msg;
while( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) )
{
bool bStop = false;
switch( msg.message )
{
case WM_ACTIVATEAPP:
case WM_COMMAND:
bStop = true;
break;
default:
if( WM_KEYFIRST <= msg.message && msg.message <= WM_KEYLAST )
bStop = true;
break;
case WM_MOUSEMOVE:
if( _ResizingIsInProgress() )
{
PeekMessage(&msg, NULL, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE);
for( ; PeekMessage(&msg, NULL, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_NOREMOVE); )
PeekMessage(&msg, NULL, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE);
if( ::GetCursorPos( &pointCurrentCursorPos ) )
{
_ResizingUpdateState( pointCurrentCursorPos );
pExtBar->OnControlBarPositionChange( pExtBar, CExtControlBar::__ECBPC_FLOATING_FRAME_RESIZING, false, false );
}
continue;
}
break;
}
if( (!bStop) && CExtMouseCaptureSink::GetCapture() != GetSafeHwnd() )
bStop = true;
if( bStop )
{
_ResizingEnd();
if( ::IsWindow( hWndExtBar ) )
pExtBar->OnControlBarPositionChange( pExtBar, CExtControlBar::__ECBPC_FLOATING_FRAME_RESIZING, false, true );
return;
}
if( !AfxGetThread()->PumpMessage() )
{
PostQuitMessage(0);
return;
}
}
if( CExtControlBar::g_bEnableOnIdleCalls )
{
for( LONG nIdleCounter = 0L; ::AfxGetThread()->OnIdle(nIdleCounter); nIdleCounter ++ );
}
}
if( ::IsWindow( hWndExtBar ) )
pExtBar->OnControlBarPositionChange( pExtBar, CExtControlBar::__ECBPC_FLOATING_FRAME_RESIZING, false, true );
}
|
|
Offer Har
|
Aug 26, 2008 - 2:19 PM
|
Problem solved!  Thanks.
|
|