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 General Discussion » CExtPropertyGridCtrl Collapse All
Subject Author Date
Osmin Lazo Nov 8, 2005 - 2:37 PM

I am trying to catch changes in value cells within the property grid control but can’t figure this one out... I dynamically create the instance of the CExtPropertyStore class and this instance itself adds instances of CExtPropertyCategory and CExtPropertyValue, like this:


IMPLEMENT_DYNAMIC( CGUIThemeStore, CExtPropertyStore );


CGUIThemeStore::CGUIThemeStore()


: CExtPropertyStore( _T("GUI Theme") )


{


}


CGUIThemeStore::~CGUIThemeStore()


{


}


bool CGUIThemeStore::Initialize()


{


CExtPropertyCategory * pCategoryColorTheme = new CExtPropertyCategory( _T("Color Theme") );


ASSERT(pCategoryColorTheme);


pCategoryColorTheme->DescriptionSet( _T("Color theme properties.") );


VERIFY( ItemInsert( pCategoryColorTheme ) );


CExtPropertyValue* pThValue = new CExtPropertyValue( _T("Color theme") );


ASSERT(pThValue);


pThValue->ValueActiveGetByRTC( RUNTIME_CLASS(CExtGridCellComboBox) );


pThValue->ValueDefaultFromActive();


pThValue->DescriptionSet( _T("Color theme.") );


pCategoryColorTheme->ItemInsert( pThValue );


CExtPropertyValue* pBkValue = new CExtPropertyValue( _T("Background color") );


ASSERT(pBkValue);


pBkValue->ValueActiveGetByRTC( RUNTIME_CLASS(CExtGridCellColor) );


pBkValue->ValueDefaultFromActive();


pBkValue->DescriptionSet( _T("Color theme background color.") );


pCategoryColorTheme->ItemInsert( pBkValue );


CExtPropertyValue* pSlValue = new CExtPropertyValue( _T("Selection color") );


ASSERT(pSlValue);


pSlValue->ValueActiveGetByRTC( RUNTIME_CLASS(CExtGridCellColor) );


pSlValue->ValueDefaultFromActive();


pSlValue->DescriptionSet( _T("Color theme selection color.") );


pCategoryColorTheme->ItemInsert( pSlValue );


return true;


}


The store is added to the grid control with CExtPropertyGridComboBoxBar::PropertyStoreInsert. I then implemented the function OnPgcInputComplete in my own instance of CExtPropertyGridCtrl but I don’t get any calls when changing cells??? Is there any special initialization that I am missing here??? Everything shows up on the screen and seems to work well though...


Thanks in advanced.

Technical Support Nov 9, 2005 - 12:14 PM

The definition of the CExtPropertyGridCtrl::OnPgcInputComplete() virtual method has not been changed:

    virtual void OnPgcInputComplete(
        CExtPropertyGridWnd * pPGW,
        CExtPropertyItem * pPropertyItem
        );
And it is invoked for all the cell types. We guess the problem is hidden somewhere else. Here is the top part of the Call Stack window when the CExtPropertyGridCtrl::OnPgcInputComplete() virtual method is invoked:
CExtPropertyGridCtrl::OnPgcInputComplete
CExtPropertyGridWnd::OnGridCellInputComplete
CExtGridWnd::OnGridCellInplaceControlTextInputComplete
CExtGridCell::OnInplaceControlTextInputComplete
CExtGridInplaceEdit::DoEndEdit
CExtGridInplaceEdit::_DoEndEdit
CExtGridInplaceEdit::WindowProc
You could try to set up breakpoints at the beginning of each of these methods and try to find out what’s wrong with the color cell in your property grid. Please let us know the results of this test.

PS Since you have a valid tech support subscription, we recommend you post messages to the Tech Support forum. We regard those messages as of higher priority.


Osmin Lazo Nov 9, 2005 - 8:42 PM

So after a few hours I found the problem.... The Help file states that the function declaration is:


virtual void OnPgcInputComplete (
CExtPropertyGridWnd & wndPG,
CExtPropertyItem * pPropertyItem
);


but going through the code I found the correct one:


virtual void OnPgcInputComplete(CExtPropertyGridWnd * pPGW, CExtPropertyItem * pPropertyItem);


That was why and now I realized that you used the correct declaration in your e-mail but I was using everything from the Help file. Also noticed that the page for CExtPropertyGridCtrl::OnPgcProcessChildWindowCommand is wrong too. That Help file can use some fixing...

Technical Support Nov 10, 2005 - 2:49 AM

Thank you for the bug report. We fixed these bugs in the raw documentation so they will not be reproduced in the next help release.