views:

44

answers:

1

Scenario: I would like a window control which is a sub-window in my dialog (a subwindow of a subwindow) to propagate its notification messages out to the dialog window.

e.g. A COMBOBOX contains an EDIT control. I have a circumstance where I would really like to know when the EDIT field gains and loses focus (mainly because the stupid COMBOBOX doesn't claim focus or give me notifications if it happens to its embedded EDIT).

But I can see how this could be a general issue: a Control issues a message to its parent WM_NOTIFY... which the direct parent doesn't care about, but maybe its parent does.

Is there a generic way to ask a windows window to propagate notification messages from its subwindows?

e.g. if dialog D has a control C which has a sub-control C', then is there a way to ensure that D receives WM_NOTIFY messages from C'?

A: 

I believe you need to subclass the window, see http://msdn.microsoft.com/en-us/library/ms997565.aspx .

villintehaspam
That is what I'm working on. Was hoping there was a less hacky way.
Mordachai