Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MFC Message Reflection

Status
Not open for further replies.

dds82

Programmer
Jun 5, 2002
251
US
I have a class derived from CEdit that processes its own EN_CHANGE notification. The problem is that this doesn't allow the parent window to receive the EN_CHANGE notification. I need to be able to process this notification both inside the control and inside its parent window. Is there any way I can first process the message in the control, and then have the message continue along the message routing path so it can be processed at all levels?

Thanks.
 
Never mind, found the answer.

Override the OnChildNotify function to call the base class's implementation, and then return 0:

Code:
BOOL CMyEdit::OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult)
{
    CEdit::OnChildNotify(message, wParam, lParam, pLResult);
    return 0;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top