|
|
|
|
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 |
|
Alastair Watts
|
Mar 30, 2011 - 4:06 AM
|
Sometimes it won’t scroll correctly to the bottom, having re-sized the parent window. Your sample RichContentFeatures exhibits the same problem.
|
|
Alastair Watts
|
Jun 26, 2011 - 10:19 AM
|
Is there a proper fix for this yet? The temporary fix you’ve provided is very jerky when re-sizing the window & I can’t bring myself to use it. Thanks.
|
|
Alastair Watts
|
Apr 6, 2011 - 6:34 AM
|
Thanks. I’ve noticed that since this temporary fix a horizontal scrollbar is sometimes unnecessarily drawn.
|
|
Technical Support
|
Apr 4, 2011 - 9:00 AM
|
We are sorry, the following method should also be updated:
void CExtRichContentScrollWnd::OnSize( UINT nType, int cx, int cy )
{
ASSERT_VALID( this );
RcsDelayRecalcLayout();
CExtNSB < CExtScrollWnd > :: OnSize( nType, cx, cy );
}
|
|
Technical Support
|
Apr 4, 2011 - 8:46 AM
|
We reproduced this issue. Thank you. We have only a temporarily fix for it at this moment:
CRect CExtRichContentScrollWnd::OnSwRecalcLayout(
bool bDoLayout,
LPCRECT pRectClientSrc // = NULL
)
{
ASSERT_VALID( this );
CRect rcLayout = CExtScrollWnd::OnSwRecalcLayout( bDoLayout, pRectClientSrc );
if( GetSafeHwnd() != NULL
&& ( m_bRcsDelayRecalcLayout
// || rcLayout != m_rcLayoutLast
)
)
{
m_rcLayoutLast = rcLayout;
if( bDoLayout )
{
CExtRichContentLayout * pRCL = RcsLayoutGet();
if( pRCL != NULL && pRCL->m_listHeap.GetCount() > 0 )
{
const CExtRichContentItem * pRootRCI = ( pRCL->m_listHeap.GetCount() > 0 ) ? pRCL->m_listHeap.GetHead() : NULL;
ASSERT( pRootRCI != NULL );
CRect _rcLayout( rcLayout );
CSize sizeScrollBars( ::GetSystemMetrics(SM_CXVSCROLL), ::GetSystemMetrics(SM_CYHSCROLL) );
bool bHaveScrollBarH = OnSwHasScrollBar( true ), bHaveScrollBarV = OnSwHasScrollBar( false );
CClientDC dc( this );
HFONT hFontRCS = OnRcsGetFont();
CFont * pFont = ( hFontRCS != NULL ) ? CFont::FromHandle( hFontRCS ) : GetFont();
CFont * pOldFont = dc.SelectObject( pFont );
OnRcsPreLayoutContent( dc, _rcLayout, pFont );
pRCL->DoLayout( dc, _rcLayout );
OnRcsPostLayoutContent( dc, _rcLayout, pFont );
bool bAddSBH = false, bRemoveSBH = false;
bool bAddSBV = false, bRemoveSBV = false;
_rcLayout = rcLayout;
CSize sizeContent = pRootRCI->m_rcLayout.Size(), sizeLayout = _rcLayout.Size();
if( sizeContent.cx > sizeLayout.cx )
bAddSBH = (! bHaveScrollBarH);
else
bRemoveSBH = bHaveScrollBarH;
if( sizeContent.cy > sizeLayout.cy )
bAddSBV = (! bHaveScrollBarV);
else
bRemoveSBV = bHaveScrollBarV;
if( bAddSBH || bRemoveSBH || bAddSBV || bRemoveSBV )
{
if( bAddSBH )
OnSwEnableScrollBarCtrl( SB_HORZ, true );
if( bRemoveSBH )
OnSwEnableScrollBarCtrl( SB_HORZ, false );
if( bAddSBV )
OnSwEnableScrollBarCtrl( SB_VERT, true );
if( bRemoveSBV )
OnSwEnableScrollBarCtrl( SB_VERT, false );
m_bRcsDelayRecalcLayout = false;
OnSwUpdateScrollBars();
rcLayout = CExtScrollWnd::OnSwRecalcLayout( bDoLayout, pRectClientSrc );
_rcLayout = OnSwGetClientRect();
OnRcsPreLayoutContent( dc, _rcLayout, pFont );
pRCL->DoLayout( dc, _rcLayout );
OnRcsPostLayoutContent( dc, _rcLayout, pFont );
m_rcLayoutLast = _rcLayout;
} // if( bAddSBH || bRemoveSBH || bAddSBV || bRemoveSBV )
dc.SelectObject( pOldFont );
m_bRcsDelayRecalcLayout = false;
} // if( pRCL != NULL && pRCL->m_listHeap.GetCount() > 0 )
} // if( bDoLayout )
} // if( .....
return rcLayout;
}
|
|
Alastair Watts
|
Apr 1, 2011 - 3:09 AM
|
A bit more info... RichContentFeatures.exe - based in 2.90 & downloaded from your site - works fine. The same program re-built using a pre-release of 2.92 will quite often fail to render the last few lines when you re-size the dialog & then scroll to the bottom.
|
|
Technical Support
|
Mar 31, 2011 - 1:13 PM
|
Do you have some HTML code which can be used in the <span class="newgreen">RichContentFeatures</code> sample application to reproduce the problem? It would be very helpful to know exact steps to reproduce it.
|
|