I was developing a MFC application and I noticed that the combobox which is created after the use of the method CMFCPropertyGridProperty::AddOption()
does not have as many functionalities as the CCombobox
class. Is there a way to bind objects from these two classes? (Better saying, is there a way to add a CCombobox
object in one CMFCPropertyGrid
subitem?)
If it isn't possible, is there an alternative way to use a combobox with the same (or just some) functionalities provided by the CCombobox
class?
Check
CreateCombo
protected member ofCMFCPropertyGridProperty
class. You should create the newCComboBox
object within this overloaded member function and initialize it withCreate
. The property is responsible for the final (not so sure) clean.UPD:
I have faced the problem with a combo box inside the property grid class some time ago. If you want to catch some extended
CComboBox
events or callCComboBox
methods inside or outside your property class, you should define your ownCreateCombo
method inside your own property and callCreateCombo
method of the baseCMFCPropertyGridProperty
class. It returns the validCComboBox*
pointer. Store this pointer inside your property member and then you can do anything with it.