Question

in MFC I'm using the event: OnPropertyChanged( The actual event works ) trying to get the changed property.

But my main worry is: How can i get the data of the selected(changed) sub item.

CMFCPropertyGridProperty * pProperty = ( CMFCPropertyGridProperty * ) lparam;
auto subitem = pProperty->GetSubItem( -- Get the selected subitem --)->GetData();

How is it possible to get the index of the selected sub item?

PS. Its a property which has multiple values, so you can expand it.

Was it helpful?

Solution

pProperty in this case will be the changed property. To get the changed value use GetValue() method. You can find out what property was changed by testing the Property name using method GetName()

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top