I'm new to MFC (coming from C# and Java) and figuring things out.
Consider a dialog with three text boxes. I have subclassed CEdit to CMyEdit, and the three text boxes are hooked up to CMyEdit variables in the dialog class.
I want to allow the dialog class to "know" when any of the three text boxes has been clicked with the left mouse button. I have found examples of how to add an ON_WM_LBUTTONDOWN handler to my CMyEdit class. Works great, but the handler is in the CMyEdit class only. Suppose that whenever one of the text boxes is clicked, I want the dialog to disable the other two. How can I get the dialog notified of the left-click?
This is a completely contrived and simplified example. I don'nt actually have an app where I'm worried about left clicks in text boxes. But I think the fact that I can't figure out how to do it indicates a fundamental misunderstanding of how to deal with UI events in MFC.
Coming from the world of C#, where everything is done for me and I have direct access to any of the events I want (got focus, mouse double click, whatever) I'm very confused on why certain events are special and provide easy access. In the case of CEdit, I don't understand why got focus, kill focus, change, and several others are "directly" available to me with no problem, but other events, like mouse click, are not.
But back to my actual question: in the scenario described above, how can I get the dialog notified of the left mouse clicks on the text boxes? Do the text boxes need to raise events or send messages (or something else) to the dialog?