简体   繁体   中英

Win32API: How to request embedded windows event notifications out to a parent window

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.

eg 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?

eg 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' ?

我相信您需要对窗口进行子类化,请参见http://msdn.microsoft.com/zh-cn/library/ms997565.aspx (内容已删除!)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM