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 » Dialog box with "&&" in the title Collapse All
Subject Author Date
Robert Webb Aug 17, 2010 - 2:43 AM

Hi,


We have a dialog box, based on a resource, where the title contains "&", eg "This & That".  But in the dialog box title it appears as "This && That", doubling the "&".  How should I stop that?


Thanks,


Rob.

Robert Webb Aug 23, 2010 - 12:16 AM

Thanks, but I’m afraid with this change I now get an assertion when I start up my app.  Here’s the Prof-UIS part of the call-stack:



	 cadwind.exe!CExtCustomizeSite::CCmdMenuInfo::Initialize(CWnd * pWndTop=0x087f47e8, unsigned int nResourceID=10005, bool bDefaultMenu=false, bool bPopupMenu=false)  Line 2164 + 0x1c bytes    C++
	 cadwind.exe!CExtCustomizeSite::MenuInfoAdd(CWnd * pWndTop=0x087f47e8, const char * strName=0x053f368c, unsigned int nResourceID=10005, bool bDefaultMenu=false, bool bPopupMenu=false, CRuntimeClass * pRtcFrame=0x02adeaf4, CRuntimeClass * pRtcView=0x00000000, CRuntimeClass * pRtcDoc=0x00000000)  Line 5589 + 0x18 bytes    C++

I took it out again, and no more assertion.  Don’t know what’s going on there.


Thanks,


Rob.

Robert Webb Sep 9, 2010 - 8:32 PM

Any answer to this?  I can’t see why your change should cause the above problem, but after recompiling everything, it seems to.  For now, I can’t use your patch.


Thanks,


Rob.

Technical Support Sep 10, 2010 - 8:40 AM

We suspect you may have applied the patch incorrectly. Here is what we saw:

http://www.prof-uis.com/download/forums/tmp/ThisAndThat.png

You can drop us an e-mail so we will provide you with the Prof-UIS 2.91 download.

Robert Webb Sep 14, 2010 - 9:33 PM

Hi again,


I decided to download the latest beta, 2.9.1 2010-09-12.  But now it hits assertions in a different place.  After stepping through these it does indeed seem to work and not have the previous problem I encountered.


The top of the new stack is as follows:



>    cadwind.exe!CExtPaintManagerOffice2010_R2_Black::CExtPaintManagerOffice2010_R2_Black()  Line 36613 + 0x3d bytes    C++
     cadwind.exe!CExtPaintManagerOffice2010_R2_Black::CreateObject()  Line 237 + 0x72 bytes    C++
     mfc80d.dll!CRuntimeClass::CreateObject()  + 0xba bytes    
     cadwind.exe!CExtPaintManager::CExtPaintManagerAutoPtr::InstallPaintManager(CRuntimeClass * pRtcPaintManager=0x065d8d58)  Line 1144 + 0x8 bytes    C++



The code in question is new since my previous 2.9.1 beta.  Here’s the new chunk:



    VERIFY(
        m_arrBmpTabArea[__ETSOI_TOP].LoadBMP_Resource(
            MAKEINTRESOURCE( IDB_EXT_2010_TAB_AREA_BK_BLACK )
            )
        );
    VERIFY( m_arrBmpTabArea[__ETSOI_TOP].Make32() );
CSize _sizeTabArea = m_arrBmpTabArea[__ETSOI_TOP].GetSize();
    m_arrBmpTabArea[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
    VERIFY(
        m_arrBmpTabArea[__ETSOI_BOTTOM].CreateRotated9xStack(
            m_arrBmpTabArea[__ETSOI_TOP],
            180,
            1,
            _sizeTabArea.cx,
            _sizeTabArea.cy,
            false,
            false
            )
        );
    VERIFY(
        m_arrBmpTabArea[__ETSOI_LEFT].CreateRotated9xStack(
            m_arrBmpTabArea[__ETSOI_TOP],
            270,
            1,
            _sizeTabArea.cx,
            _sizeTabArea.cy,
            false,
            false
            )
        );
    VERIFY(
        m_arrBmpTabArea[__ETSOI_RIGHT].CreateRotated9xStack(
            m_arrBmpTabArea[__ETSOI_TOP],
            90,
            1,
            _sizeTabArea.cx,
            _sizeTabArea.cy,
            false,
            false
            )
        );

Every VERIFY above fails.  Is this a known issue?

Robert Webb Sep 14, 2010 - 11:26 PM

Further to the above comment, I now see that the chunk of code is repeated seven times throughout that file, with only the IDB_EXT_2010_TAB_AREA_BK_BLACK at the start changed.  Some were there before (the ones with ...2007... IDs) and seem to be fine.  The new ones, using the ...2010... IDs cause assertions though.


Thanks,


Rob.

Technical Support Sep 15, 2010 - 10:06 AM

There are two common cases when Prof-UIS resources cannot be loaded:

1) The Prof-UIS is linked with your app statically and Prof-UIS resources are not available. The .rc2 file of your project should contain the following lines:

#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
            #include <Resources/Resource.rc>
#endif


1) The 28000..32000 range of resource identifiers is used by Prof-UIS. The resource.h file of your project should not define identifiers in this range.

Robert Webb Sep 22, 2010 - 9:45 PM

Neither of those things seem to be the problem.  It works fine if I just comment out the chunks of code I mentioned above, so all other ProfUIS resources seem to be fine.


We are linking statically, but our .rc2 files have had the code you suggest since the start.


I’ll try another nightly build sometime.  Otherwise, not sure what’s going on here.

Technical Support Aug 20, 2010 - 2:30 AM

Please update the source code for the following method:

bool CExtRichContentLayout::ParsePlainText(
            __EXT_MFC_SAFE_LPCTSTR strPlainText,
            UINT nDTF, // = 0 // DT_*** flags from Win32’s DrawText() API (used mainly by plain text format)
            UINT nExtDTF, // = 0 // __EXT_DT_*** flags (Prof-UIS)
            bool bEmptyLocalObjectContainer // = true
            )
{
            nDTF; nExtDTF;
            Empty( bEmptyLocalObjectContainer );
            m_eLFMT = __ELFMT_PLAIN_TEXT;
            if( LPCTSTR(strPlainText) == NULL || _tcslen( LPCTSTR(strPlainText) ) == 0 )
                        return true;
CExtRichContentItem * pRootRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_ROOT );
            pRootRCI->m_bHaveStyleChangingCache = true;
            m_listHeap.AddHead( pRootRCI );
CExtRichContentItem * pRCI_Paragraph = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_GENERIC_TAG );
            m_listHeap.AddTail( pRCI_Paragraph );
            pRCI_Paragraph->m_bHaveStyleChangingCache = true;
            pRCI_Paragraph->m_styleChangingCache.m_eD = CExtRichStyleDescription::ed_block;
            pRCI_Paragraph->m_styleChangingCache.m_eWST = CExtRichStyleDescription::ewstPre;
            pRCI_Paragraph->m_strTextParsed = _T("p");
            pRCI_Paragraph->m_bClosingTag = false;
            pRootRCI->m_listItems.AddTail( pRCI_Paragraph );
CExtRichContentItem * pRCI_Previous_Prefix = NULL;
LPCTSTR p = LPCTSTR(strPlainText);
CExtSafeString strGatheredText;
bool bPreviousSpace = false;
bool bSpace = false;
bool bPrefix = false;
            for( ; (*p) != _T(’\0’); p++ )
            {
                        if(                     ( ( (*p) == _T(’ ’) || ( (*p) == _T(’\t’) ) || ( (*p) == _T(’\n’) ) ) && ! bSpace )
                                    ||           strGatheredText == _T("\n")
                                    ||           strGatheredText == _T("\t")
                                    ||           ( strGatheredText == _T(" ") && (*p) != _T(’ ’) )
                                    )
                        {
                                    bool bNewLine = ( strGatheredText == _T("\n") ) ? true : false;
                                    bool bTextIsSpace = ( strGatheredText == _T(" ") || strGatheredText == _T("\t") ) ? true : false;
                                    if( strGatheredText == _T(’\n’) && ( ( nDTF&DT_SINGLELINE ) == 0 ) )
                                    {
                                                if( (*p) == _T(’\0’) )
                                                            break;
                                                CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_GENERIC_TAG );
                                                m_listHeap.AddTail( pRCI );
                                                pRCI->m_bHaveStyleChangingCache = true;
                                                pRCI->m_bHaveEffectiveStyleCache = true;

                                                pRCI->m_styleChangingCache.m_sizeWH.cy = 0;
                                                if( m_listHeap.GetCount() > 0 )
                                                {
                                                            POSITION posHeap = m_listHeap.GetTailPosition();
                                                            __EXT_DEBUG_RICH_CONTENT_ASSERT( posHeap != NULL );
                                                            CExtRichContentItem * pHeapRCI = m_listHeap.GetPrev( posHeap );
                                                            __EXT_DEBUG_RICH_CONTENT_ASSERT( pHeapRCI == pRCI );
                                                            pHeapRCI;
                                                            for( ; posHeap != NULL; )
                                                            {
                                                                        pHeapRCI = m_listHeap.GetPrev( posHeap );
                                                                        if( pHeapRCI->m_eType == CExtRichContentItem::__EHIT_TEXT_SPACE  )
                                                                                    continue;
                                                                        if(                     pHeapRCI->m_eType == CExtRichContentItem::__EHIT_GENERIC_TAG
                                                                                    &&        pHeapRCI->m_styleChangingCache.m_eD == CExtRichStyleDescription::ed_block
                                                                                    &&        (           pHeapRCI->m_strTextParsed == LPCTSTR( _T("p") )
                                                                                                ||           pHeapRCI->m_strTextParsed == LPCTSTR( _T("br") )
                                                                                                )
                                                                                    )
                                                                                    pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
                                                                        break;
                                                            }
                                                            if( posHeap == NULL )
                                                                                    pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
                                                }

                                                if( bPrefix )
                                                {
                                                            if( pRCI_Previous_Prefix != NULL )
                                                                        pRCI_Previous_Prefix->m_styleChangingCache.m_nUnderline = 0;
                                                            pRCI->m_styleChangingCache.m_nUnderline = ( ( nDTF&DT_NOPREFIX ) != 0 || ( nDTF&DT_HIDEPREFIX ) != 0 ) ? 0 : 1;
                                                            bPrefix = false;
                                                }
                                                if( ( nDTF&DT_SINGLELINE ) == 0 )
                                                            pRCI_Previous_Prefix = NULL;
                                                pRCI->m_styleChangingCache.m_eD = CExtRichStyleDescription::ed_block;
                                                pRCI->m_strTextParsed = LPCTSTR( _T("br") );
                                                if( ( nDTF&DT_PREFIXONLY ) != 0 )
                                                            pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
                                                pRCI_Paragraph->m_listItems.AddTail( pRCI );
                                                strGatheredText.Empty();
                                                bPreviousSpace = false;
                                    }
                                    else if(  strGatheredText == _T(’\t’) 
                                                            ||           ( strGatheredText == _T(’\n’) && ( ( nDTF&DT_SINGLELINE ) != 0 ) )
                                                            )
                                    {
                                                CExtRichContentItem::e_html_item_type_t eType =
                                                            ( (strGatheredText == _T(’\t’)) && ((nDTF&DT_EXPANDTABS) != 0) )
                                                                        ? CExtRichContentItem::__EHIT_TEXT_SPACE
                                                                        : CExtRichContentItem::__EHIT_TEXT_RANGE;
                                                CExtRichContentItem * pRCI = new CExtRichContentItem( *this, eType );
                                                m_listHeap.AddTail( pRCI );
                                                pRCI->m_bHaveStyleChangingCache = true;
                                                pRCI->m_bHaveEffectiveStyleCache = true;
                                                pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
                                                pRCI->m_strTextParsed = LPCTSTR(strGatheredText);
                                                if( bPrefix )
                                                {
                                                            if( pRCI_Previous_Prefix != NULL )
                                                                        pRCI_Previous_Prefix->m_styleChangingCache.m_nUnderline = 0;
                                                            pRCI_Previous_Prefix = pRCI;
                                                            pRCI->m_styleChangingCache.m_nUnderline = ( ( nDTF&DT_NOPREFIX ) != 0 || ( nDTF&DT_HIDEPREFIX ) != 0 ) ? 0 : 1;
                                                            bPrefix = false;
                                                }
                                                if( ( nDTF&DT_PREFIXONLY ) != 0 )
                                                            pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
                                                pRCI_Paragraph->m_listItems.AddTail( pRCI );
                                                strGatheredText.Empty();
                                                bPreviousSpace = false;
                                    }
                                    else if( ! strGatheredText.IsEmpty() && strGatheredText != _T(" ") )
                                    {
                                                CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_TEXT_RANGE );
                                                m_listHeap.AddTail( pRCI );
                                                pRCI->m_bHaveStyleChangingCache = true;
                                                pRCI->m_bHaveEffectiveStyleCache = true;
                                                pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
                                                pRCI->m_strTextParsed = LPCTSTR(strGatheredText);
                                                if( ( nDTF&DT_PREFIXONLY ) != 0 )
                                                            pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
                                                pRCI_Paragraph->m_listItems.AddTail( pRCI );
                                                strGatheredText.Empty();
                                                bPreviousSpace = false;
                                    }
                                    else if( strGatheredText == _T(" ") )
                                    {
                                                CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_TEXT_SPACE );
                                                m_listHeap.AddTail( pRCI );
                                                pRCI->m_bHaveStyleChangingCache = true;
                                                pRCI->m_bHaveEffectiveStyleCache = true;
                                                pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
                                                pRCI->m_strTextParsed = LPCTSTR(strGatheredText);
                                                if( bPrefix )
                                                {
                                                            if( pRCI_Previous_Prefix != NULL )
                                                                        pRCI_Previous_Prefix->m_styleChangingCache.m_nUnderline = 0;
                                                            pRCI_Previous_Prefix = pRCI;
                                                            pRCI->m_styleChangingCache.m_nUnderline = ( ( nDTF&DT_NOPREFIX ) != 0 || ( nDTF&DT_HIDEPREFIX ) != 0 ) ? 0 : 1;
                                                            bPrefix = false;
                                                }
                                                if( ( nDTF&DT_PREFIXONLY ) != 0 )
                                                            pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
                                                pRCI_Paragraph->m_listItems.AddTail( pRCI );
                                                strGatheredText.Empty();
                                                bPreviousSpace = false;
                                    }
                                    bSpace = false;
                                    if( (*p    ) != _T(’ ’) && ( (*p) != _T(’\t’) ) && ( (*p) != _T(’\n’) ) && ! bNewLine && ! bTextIsSpace )
                                                continue;
                                    if( ! bNewLine && (*p) != _T(’\n’) && (*p) == _T(’ ’) )
                                    {
                                                bSpace = true;
                                                bPreviousSpace = true;
                                    }
                        }
                        if( bPreviousSpace && ( (*p) != _T(’ ’) /*&& ( (*p) != _T(’\t’) )*/ /*&& ( (*p) != _T(’\n’) )*/ ) )
                        {
                                    CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_TEXT_SPACE );
                                    m_listHeap.AddTail( pRCI );
                                    pRCI->m_bHaveStyleChangingCache = true;
                                    pRCI->m_bHaveEffectiveStyleCache = true;
                                    pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
                                    if( strGatheredText.IsEmpty() && ( ( nDTF&DT_SINGLELINE ) == 0 ) )
                                                strGatheredText = _T(" ");
                                    pRCI->m_strTextParsed = LPCTSTR( strGatheredText );
                                    if( bPrefix && !strGatheredText.IsEmpty() )
                                    {
                                                if( pRCI_Previous_Prefix != NULL )
                                                            pRCI_Previous_Prefix->m_styleChangingCache.m_nUnderline = 0;
                                                pRCI_Previous_Prefix = pRCI;
                                                pRCI->m_styleChangingCache.m_nUnderline = ( ( nDTF&DT_NOPREFIX ) != 0 || ( nDTF&DT_HIDEPREFIX ) != 0 ) ? 0 : 1;
                                                bPrefix = false;
                                    }
                                    if( ( nDTF&DT_PREFIXONLY ) != 0 )
                                                pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
                                    pRCI_Paragraph->m_listItems.AddTail( pRCI );
                                    bPreviousSpace = false;

                                    strGatheredText.Empty();
                                    bSpace = false;
                        }
                        if( ( (*p) != _T(’\r’) ) )
                        {
                                    if(                     ( (*p) == _T(’&’) && bPrefix )
                                                ||           ( ( nDTF&DT_NOPREFIX ) != 0 )
                                               ||           ( (*p) != _T(’&’) && (! bPrefix) )
                                                ||           ( (*p) == _T(’\n’) && bPrefix )
                                                )
                                    {
                                                strGatheredText += (*p);
                                                if( ! ( (*p) == _T(’\n’) && bPrefix ) )
                                                            bPrefix = false;
                                    }
                                    else if( (*p) != _T(’&’) && bPrefix )
                                    {
                                                if( ! strGatheredText.IsEmpty() )
                                                {
                                                            CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_TEXT_RANGE );
                                                            m_listHeap.AddTail( pRCI );
                                                            pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
                                                            pRCI->m_bHaveStyleChangingCache = true;
                                                            pRCI->m_bHaveEffectiveStyleCache = true;
                                                            pRCI->m_strTextParsed = LPCTSTR( strGatheredText );
                                                            if( ( nDTF&DT_PREFIXONLY ) != 0 )
                                                                        pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
                                                            pRCI_Paragraph->m_listItems.AddTail( pRCI );
                                                }
                                                CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_TEXT_RANGE );
                                                m_listHeap.AddTail( pRCI );
                                                pRCI->m_bHaveStyleChangingCache = true;
                                                pRCI->m_bHaveEffectiveStyleCache = true;
                                                pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
                                                if( pRCI_Previous_Prefix != NULL )
                                                            pRCI_Previous_Prefix->m_styleChangingCache.m_nUnderline = 0;
                                                pRCI_Previous_Prefix = pRCI;
                                                pRCI->m_styleChangingCache.m_nUnderline = ( ( nDTF&DT_NOPREFIX ) != 0 || ( nDTF&DT_HIDEPREFIX ) != 0 ) ? 0 : 1;
                                                pRCI->m_strTextEffective = pRCI->m_strTextParsed = (*p);
                                                if( ( nDTF&DT_PREFIXONLY ) != 0 )
                                                            pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
                                                pRCI_Paragraph->m_listItems.AddTail( pRCI );
                                                bPreviousSpace = false;
                                                strGatheredText.Empty();
                                                bSpace = false;
                                                bPrefix = false;
                                    }
                                    else if( (*p) == _T(’&’) )
                                                bPrefix = true;
                        }
            }
            if(                     ! strGatheredText.IsEmpty()
                        &&        (           ( strGatheredText == _T("\n") && (nDTF&DT_SINGLELINE) != 0 )
                                    ||           strGatheredText != _T("\n")         
                                    )           
                        )
            {
                        CExtRichContentItem::e_html_item_type_t e_hit = bSpace ? CExtRichContentItem::__EHIT_TEXT_SPACE : CExtRichContentItem::__EHIT_TEXT_RANGE;
                        CExtRichContentItem * pRCI = new CExtRichContentItem( *this, e_hit );
                        m_listHeap.AddTail( pRCI );
                        pRCI->m_bHaveStyleChangingCache = true;
                        pRCI->m_bHaveEffectiveStyleCache = true;
                        pRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
                        pRCI->m_strTextParsed = LPCTSTR(strGatheredText);
                        if( ( nDTF&DT_PREFIXONLY ) != 0 )
                                    pRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
                        pRCI_Paragraph->m_listItems.AddTail( pRCI );
            }
            if( ! strGatheredText.IsEmpty() &&          strGatheredText == _T("\n") && (nDTF&DT_SINGLELINE) == 0 )
            {
                        CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_GENERIC_TAG );
                        m_listHeap.AddTail( pRCI );
                        pRCI->m_styleChangingCache.m_eD = CExtRichStyleDescription::ed_block;
                        pRCI->m_strTextParsed = LPCTSTR( _T("br") );
                        pRCI->m_bHaveStyleChangingCache = true;
                        pRCI->m_bHaveEffectiveStyleCache = true;
                        pRCI_Paragraph->m_listItems.AddTail( pRCI );
            }
            if( ( nDTF&DT_SINGLELINE ) == 0 && pRCI_Paragraph->m_listItems.GetCount() > 0 )
            {
                        CExtRichContentItem * pTailRCI = ( pRCI_Paragraph->m_listItems.GetCount() > 0 ) ? pRCI_Paragraph->m_listItems.GetTail() : NULL;
                        if( pTailRCI->m_strTextParsed == LPCTSTR( _T("br") ) )
                        {
                                    CExtRichContentItem * pRCI = new CExtRichContentItem( *this, CExtRichContentItem::__EHIT_TEXT_SPACE );
                                    m_listHeap.AddTail( pRCI );
                                    pRCI->m_bHaveStyleChangingCache = true;
                                    pRCI->m_bHaveEffectiveStyleCache = true;
                                    pRCI_Paragraph->m_listItems.AddTail( pRCI );
                        }
            }
bool bModifyStringMode = ( ( nDTF & (DT_MODIFYSTRING|DT_CALCRECT|DT_NOCLIP) ) == DT_MODIFYSTRING ) ? true : false;
bool bEllipsis = ( ( nDTF & ( DT_END_ELLIPSIS|DT_WORD_ELLIPSIS|DT_PATH_ELLIPSIS ) ) != 0 ) ? true : false;
            if( bModifyStringMode || bEllipsis )
            {
                        CList < CExtRichContentItem *, CExtRichContentItem * > listComposed;
                        for( ; pRCI_Paragraph->m_listItems.GetCount() > 0; )
                        {
                                    bool bDeleteItem = false;
                                    CExtRichContentItem * pRCI = pRCI_Paragraph->m_listItems.GetHead();
                                    CExtRichContentItem::e_html_item_type_t _eType = pRCI->m_eType;
                                    switch( _eType )
                                    {
                                    case CExtRichContentItem::__EHIT_TEXT_SPACE:
                                    case CExtRichContentItem::__EHIT_TEXT_RANGE:
                                    {
                                                INT nTextLen = INT(pRCI->m_strTextParsed.GetLength());
                                                if( nTextLen > 1 )
                                                {
                                                            bDeleteItem = true;
                                                            INT nTextPos;
                                                            for( nTextPos = 0; nTextPos < nTextLen; nTextPos ++ )
                                                            {
                                                                        TCHAR tchr = pRCI->m_strTextParsed.GetAt( nTextPos );
                                                                        CExtRichContentItem * pCharRCI = new CExtRichContentItem( *this, _eType );
                                                                        pCharRCI->m_bHaveStyleChangingCache = true;
                                                                        pCharRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
                                                                        pCharRCI->m_strTextParsed += tchr;
                                                                        if( ( nDTF&DT_PREFIXONLY ) != 0 )
                                                                                    pCharRCI->m_styleEffective.m_bDtPrefixOnlyMode = true;
                                                                        listComposed.AddTail( pCharRCI );
                                                            }
                                                }
                                                else
                                                {
                                                            if( pRCI->m_strTextParsed == _T("&") )
                                                            {
                                                                        CExtRichContentItem * pCharRCI = new CExtRichContentItem( *this, _eType );
                                                                        pCharRCI->m_bHaveStyleChangingCache = true;
                                                                        pCharRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
                                                                        pCharRCI->m_strTextParsed = _T("&");
                                                                        listComposed.AddTail( pCharRCI );
                                                            }
                                                            else if( pRCI->m_styleChangingCache.m_nUnderline && (! bEllipsis) )
                                                            {
                                                                        CExtRichContentItem * pCharRCI = new CExtRichContentItem( *this, _eType );
                                                                        pCharRCI->m_bHaveStyleChangingCache = true;
                                                                        pCharRCI->m_styleChangingCache.m_sizeWH.cy = m_nPlainTextLineHeight;
                                                                        pCharRCI->m_strTextParsed = _T("&");
                                                                        listComposed.AddTail( pCharRCI );
                                                                        pCharRCI = new CExtRichContentItem( *this, _eType );
                                                                        pCharRCI->m_bHaveStyleChangingCache = true;
                                                                        pCharRCI->m_strTextParsed = pRCI->m_strTextParsed;
                                                                        listComposed.AddTail( pCharRCI );
                                                            }
                                                            else
                                                                        listComposed.AddTail( pRCI );
                                                }
                                    }
                                    break;
                                    default:
                                                listComposed.AddTail( pRCI );
                                    break;
                                    }
                                    pRCI_Paragraph->m_listItems.RemoveHead();
                                    POSITION pos = m_listHeap.Find( pRCI );
                                    if( pos != NULL )
                                                m_listHeap.RemoveAt( pos );
                                    if( bDeleteItem )
                                                delete pRCI;
                        }
                        __EXT_DEBUG_RICH_CONTENT_ASSERT( pRCI_Paragraph->m_listItems.GetCount() == 0 );
                        POSITION pos = listComposed.GetHeadPosition();
                        for( ; pos != NULL ; )
                        {
                                    CExtRichContentItem * pRCI = listComposed.GetNext( pos );
                                    pRCI_Paragraph->m_listItems.AddTail( pRCI );
                                    m_listHeap.AddTail( pRCI );
                        }
            }
            if( ( nDTF&DT_LEFT ) != 0 )
                        pRCI_Paragraph->m_styleChangingCache.m_eaH = CExtRichStyleDescription::eahLeft;
            if( ( nDTF&DT_CENTER ) != 0 )
                        pRCI_Paragraph->m_styleChangingCache.m_eaH = CExtRichStyleDescription::eahCenter;
            if( ( nDTF&DT_RIGHT ) != 0 )
                        pRCI_Paragraph->m_styleChangingCache.m_eaH = CExtRichStyleDescription::eahRight;
            if( ( nDTF&DT_SINGLELINE ) != 0 || (nExtDTF&__EXT_DT_MULTI_LINE_VERT_ALIGNMENT ) != 0 )
            {
                        if( ( nDTF&DT_TOP ) != 0 )
                        {
                                    pRootRCI->m_styleChangingCache.m_eaV = CExtRichStyleDescription::eavTop;
                                    pRootRCI->m_styleChangingCache.m_sizeWHP.cy = 100;
                                    pRCI_Paragraph->m_styleChangingCache.m_sizeWHP.cy = 100;
                        }
                        if( ( nDTF&DT_VCENTER ) != 0 )
                        {
                                    pRootRCI->m_styleChangingCache.m_eaV = CExtRichStyleDescription::eavMiddle;
                                    pRootRCI->m_styleChangingCache.m_sizeWHP.cy = 100;
                                    pRCI_Paragraph->m_styleChangingCache.m_sizeWHP.cy = 100;
                        }
                        if( ( nDTF&DT_BOTTOM ) != 0 )
                        {
                                    pRootRCI->m_styleChangingCache.m_eaV = CExtRichStyleDescription::eavBottom;
                                    pRootRCI->m_styleChangingCache.m_sizeWHP.cy = 100;
                                    pRCI_Paragraph->m_styleChangingCache.m_sizeWHP.cy = 100;
                        }
            }
            if( ( nDTF&DT_WORDBREAK ) != 0 && ( nDTF&DT_SINGLELINE ) == 0 )
                        pRCI_Paragraph->m_styleChangingCache.m_eWST = CExtRichStyleDescription::ewstPreWrap;
            strGatheredText.Empty();
            return true;
}


Technical Support Aug 17, 2010 - 12:32 PM

You found an issue of the CExtRichContentLayout::stat_DrawText() API. It & symbol is not handled correctly in case of both DT_SINGLELINE|DT_END_ELLIPSIS flags are specified. Please give us 2-3 days to fix it.