Pregunta

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.

¿Fue útil?

Solución

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()

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top