We need to reproduce the problem in some way. That is why we asked you to prepare and send a test project. Actually you could also modify our CompoundProperties sample . We added the following method to declaration of the CCanvasPropertyGridCtrl
class in this sample:
bool OnPgcCreateBars()
{
ASSERT_VALID( this );
try
{
// CExtPropertyGridComboBoxBar * pComboBoxBar =
// new CExtPropertyGridComboBoxBar( this );
// pComboBoxBar->m_bAutoDeleteWindow = true;
// if( ! pComboBoxBar->Create(
// this,
// true
// )
// )
// {
// ASSERT( FALSE );
// throw __EXT_MFC_ID_PROPERTY_GRID_COMBO_BOX;
// }
CExtPropertyGridToolBar * pToolBar =
new CExtPropertyGridToolBar( this );
pToolBar->m_bAutoDeleteWindow = true;
if( ! pToolBar->Create(
this,
true
)
)
{
ASSERT( FALSE );
throw __EXT_MFC_ID_PROPERTY_GRID_TOOLBAR;
}
CExtPropertyGridTipBar * pTipBar =
new CExtPropertyGridTipBar( this );
pTipBar->m_bAutoDeleteWindow = true;
if( ! pTipBar->Create(
this,
true
)
)
{
ASSERT( FALSE );
throw __EXT_MFC_ID_PROPERTY_GRID_TIPBAR;
}
}
catch( ... )
{
return false;
}
return true;
}
So please try it. This is enough to kill the combo box inside the property grid control but not enough to make the
CompoundProperties working. So, we also commented out the following lines in the
CMainDlg::OnInitDialog()
method:
// CExtPropertyGridComboBoxBar * pCombo =
// STATIC_DOWNCAST(
// CExtPropertyGridComboBoxBar,
// m_PGC.GetChildByRTC(
// RUNTIME_CLASS(CExtPropertyGridComboBoxBar)
// )
// );
// ASSERT_VALID( pCombo );
// m_PGC.m_PS.Combine( &(m_PGC.m_OC.m_obj1.GetPropertyStore()) );
// m_PGC.m_PS.Combine( &(m_PGC.m_OC.m_obj2.GetPropertyStore()) );
// m_PGC.m_PS.Combine( &(m_PGC.m_OC.m_obj3.GetPropertyStore()) );
And we commented the following lines in the same method:
// pCombo->PropertyStoreInsert( &m_PGC.m_PS );
// pCombo->PropertyStoreInsert( &(m_PGC.m_OC.m_obj1.GetPropertyStore()) );
// pCombo->PropertyStoreInsert( &(m_PGC.m_OC.m_obj2.GetPropertyStore()) );
// pCombo->PropertyStoreInsert( &(m_PGC.m_OC.m_obj3.GetPropertyStore()) );
// pCombo->SetCurSel( 1 );
// m_PGC.PropertyStoreSet( &(m_PGC.m_OC.m_obj1.GetPropertyStore()) );
Now you can run the sample application and see the property grid control without the combo box. What we did is:
1) We removed the combo box bar from the property grid control.
2) We removed some references to this combo box bar from the source code of our sample application.