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 » The Sample program, Prof-Uis Controls-ym.exe, crashes on Windows Server 2003, x64 edition Collapse All
Subject Author Date
Robert Hofstetter Apr 27, 2010 - 10:50 PM

Just open the ProfUIS_900_x64.sln with Microsoft Visual studio 2008



Build the project  Prof-UIs Controls with configuration "Static MBCS Release with MFC Dll" and Platform x64



Start the program on Windows Server 2003, x64 edition and click ListView, Notice the list column headers are not displayed correctly.



Resize the main window and then program crashes.



The debug build works fine. Only the release build crashes. Tested the Prof-Uis version 2.85 and 2.88, both have the same problem.



It seems to crash somewhere in CExtHeaderCtrl.



Please let know if this is a bug and any solutions. Thanks

Technical Support May 3, 2010 - 1:31 PM

We reproduced this issue. Thank you. To fix it, please update the source code for the following method:

void CExtHeaderCtrl::OnPaint() 
{
            ASSERT_VALID( this );
CRect rcClient;
            GetClientRect( &rcClient );
CPaintDC dcPaint( this );
CExtMemoryDC dc( &dcPaint, &rcClient );
            OnEraseHeaderBackground( dc, rcClient );
INT nColNo, nColCount = INT(GetItemCount());
            for( nColNo = 0; nColNo < nColCount; nColNo++ )
            {
                        CRect _rcItemEntire;
                        if( ! GetItemRect( nColNo, &_rcItemEntire ) )
                                    continue;
                        if( ! dc.RectVisible( &_rcItemEntire ) )
                                    continue;
                        HD_ITEM _item;
                        ::memset( &_item, 0, sizeof(HD_ITEM) );
                        _item.mask = UINT(-1) & (~(__EXT_MFC_HDI_FILTER));
                        TCHAR strText[ 1024 ];
                        ::memset( strText, 0, sizeof(strText) );
                        _item.cchTextMax = sizeof( strText ) / sizeof( strText[0] - 1 );
                        _item.pszText = strText;
                        GetItem( nColNo, &_item );
                        OnPaintHeaderItem( dc, _item, nColNo, _rcItemEntire );
            }
}
Please also add the following line of code somewhere before the method mentioned above:
#define __EXT_MFC_HDI_FILTER              0x0100

Robert Hofstetter May 6, 2010 - 1:30 AM

Thanks! The problem is fixed

Technical Support Apr 28, 2010 - 10:14 AM

The CExtHeaderCtrl themed header control in Prof-UIS 2.88 and older versions can really cause crashes on particular systems, especially if the header text is quite short (less than 5 characters). This is fixed in v.2.89.

Robert Hofstetter Apr 29, 2010 - 6:11 PM

Prof-UIS 2.89 has the exactly same problem!


Please test it following the above procedure and let me know if you can fix it.