Professional UI Solutions
Site Map   /  Register


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 General Discussion » CExtPropertyGrid crash - (CExtGridCellCheckBox or CExtGridCellButton) Collapse All
Subject Author Date
Takis Takoglou Jun 12, 2009 - 4:59 AM

Good Day,

In my property grid, when using a CExtGridCellCheckBox or a CExtGridCellButton-derived object the following occurs.

If i select the property value name of the checkbox (or button) i.e. the cell that contains the value name, and then press a character in the keyboard the program crashes!

How can i avoid that?

PS. Other types of cells, including Bool,Num,Combobox. do not cause the program to crash.

Thanx in advance,


Bart Kampers Jul 20, 2009 - 8:28 AM

I implemented the code above. It seem exactly the sam as the original code in 2.85. My applications still crashes when I type any key and a checkbox cell is selected.

Technical Support Jul 20, 2009 - 10:49 AM

Could request the source code update by email?

Technical Support Jun 16, 2009 - 12:51 PM

We found the same issue related to the CExtGridCellCheckBox and CExtGridCellButton classes. Please drop us an e-mail to the support mail box at this web site so we will provide you with the source code update.

Technical Support Jun 16, 2009 - 12:47 PM

Please find the CExtGridCellBool::OnParseText() method in the .../Prof-UIS/Src/ExtGridWnd.cpp file and update the source code for this method from our previous answer in this forum thread. This will fix the reported issue with the CExtGridCellBool class. We were unable to reproduce the same problem with the CExtGridCellCheckBox and CExtGridCellButton classes using the PropertyGrid sample. So, we need more details about the last two classes.

Technical Support Jun 12, 2009 - 8:32 AM

Thank you for reporting this bug. Here is the fix:

HRESULT CExtGridCellBool::OnParseText( __EXT_MFC_SAFE_LPCTSTR sText ) const
      ASSERT_VALID( this );
      ASSERT( sText != NULL );
      if( sText == NULL )
            return E_INVALIDARG;
      if(         m_sLabelTrue.CompareNoCase( sText ) == 0
            ||    m_sLabelFalse.CompareNoCase( sText ) == 0
            return S_OK;
      if(         m_sLabelTrue.GetLength() > 0
            &&    m_sLabelFalse.GetLength() > 0
            &&    _tcslen( sText ) > 0
            TCHAR chrTrue  = (TCHAR)_totlower( m_sLabelTrue[ 0 ] );
            TCHAR chrFalse = (TCHAR)_totlower( m_sLabelFalse[ 0 ] );
            TCHAR chrCheck = (TCHAR)_totlower( sText[ 0 ] );
            if( chrTrue != chrFalse )
                  if( chrCheck == chrTrue )
                        return S_OK;
                  if( chrCheck == chrFalse )
                        return S_OK;
                  if(         chrTrue != _T(’0’)
                        &&    chrFalse !=  _T(’0’)
                        &&    chrTrue != _T(’1’)
                        &&    chrFalse !=  _T(’1’)
                        &&    ( chrCheck !=  _T(’0’) || chrCheck !=  _T(’1’) )
                        return S_OK;
      return E_FAIL;

Takis Takoglou Jun 16, 2009 - 5:14 AM

Good Day,

thank you for the quick response.

Could you please clarify in which file(s)  i should replace/add the above code? Also, is the class CExtGridCellBool the one with the problem? Because in my program the crashes occured when using CExtGridCellCheckBox or  CExtGridCellButton.


Thanx in advance,