1

A few days ago I've started to develop a MFC Application which works as a Client for a database of mine. Lately, I was trying to implement a method which is executed every time a property value is changed (preferably a field which works as a combobox) on the Properties Window. My first attempt was to override the CMFCPropertyGridProperty::OnUpdateValue(). I was able to "implement" this method properly, but it didn't worked as expected (I believe that the main problem here is that I did not implemented it directly on the CProperties class, but I couldn't find any other references in the internet).

So, I've moved on to commands based on message maps. I've tried many kinds of commands, like ON_CONTROL_REFLECT, CBN_EDITCHANGE, CBN_EDITUPDATE, but none of these seemed to help. I'm not sure if I've done a huge mistake on defining the main properties (first argument from these previos commands) or if they are exclusive commands for the CCombobox class. In other words, these commands seemed to be useless to my current Property Grid since the only "combobox" I've used until now is that one which is generated when the method CMFCPropertyGridProperty::AddOption() is used (Important note: my whole Property Grid is basically formed by CMFCPropertyGridProperty objects).

Anyway, I believe that the answers for my doubts and the solution for this problem are kind of simple, but I am still a newbie in C++ and MFC...

Mudkip
  • 373
  • 6
  • 27
  • 1
    You are right, the solution is simple: Learn the Windows API. You cannot possibly hope to understand MFC without a **solid** understanding of the Windows API. You toss around unrelated terms (`ON_CONTROL_REFLECT`, `CBN_*`) and collectively call them *commands*. Unless you truly understand what they are, how they are used, and when, you will fail, again, and again, and again, and again. – IInspectable Nov 20 '13 at 17:19
  • @llnspectable, thank you for the tip. Do you have any recomendation about where should I look or what should I study in order to learn Windows API properly? – Mudkip Nov 20 '13 at 17:56
  • Fairly compact and very decent tutorial: [theForger's Win32 API Tutorial](http://winprog.org/tutorial/). – IInspectable Nov 20 '13 at 18:34

0 Answers0