0

I have a trouble with CMFCPropertyGrid placed on a dockable pane. When I edit value in the grid and do not finish the edit then click on the document's view, the value stills old. To update it I (as a user) have click the dockable pane again and enter on the value to finish edit and update the value. Everything works fine when I click on the white space of the grid while editing value.

What I tried. I tried to catch ON_WM_KILLFOCUS and ON_WM_ACTIVATE of the dockable pane. But these message are not cought when click on the document's view as I described.

How can I process the events to call the grid's EndEdit method when clicking somewhere outside the dockable pane during text edits in CMFCPropertyGrid?

Dmitry K.
  • 313
  • 3
  • 17

1 Answers1

1

The value is likely being edited inside an Edit control. I would look for the EN_KILLFOCUS notification code.

l33t
  • 18,692
  • 16
  • 103
  • 180
  • It doesn't work. Looks like all controls have focus when I click the document view. Wait, I see that when I move the mouse outside the dockable pane I notice that the header flashes and is drawn in another color. – Dmitry K. Nov 08 '13 at 16:37
  • You are right, it didn't worked first time because I use custom edit box within property grid property. I changed my `CEdit`'s id to `AFX_PROPLIST_ID_INPLACE` and it worked. Finally. There are no docs for that. MFC looks like a nightmare after Qt event when 1.5 years of MFC working experience passed. I am terribly angry. – Dmitry K. Nov 11 '13 at 15:33