对应的是EN_CHANGE通知消息注意它是通知消息——控件向父窗口发送的消息 所以应该对控件的父窗口设置子类 MSDN:EN_CHANGE The EN_CHANGE notification message is sent when the user has taken an action that may have altered text in an edit control. Unlike the EN_UPDATE notification message, this notification message is sent after the system updates the screen. The parent window of the edit control receives this notification message through the WM_COMMAND message. EN_CHANGE idEditCtrl = (int) LOWORD(wParam); // identifier of edit control hwndEditCtrl = (HWND) lParam; // handle of edit control
QuickInfo Windows NT: Requires version 3.1 or later. Windows: Requires Windows 95 or later. Windows CE: Requires version 1.0 or later. Header: Declared in winuser.h.
所以应该对控件的父窗口设置子类
MSDN:EN_CHANGE
The EN_CHANGE notification message is sent when the user has taken an action that may have altered text in an edit control. Unlike the EN_UPDATE notification message, this notification message is sent after the system updates the screen. The parent window of the edit control receives this notification message through the WM_COMMAND message. EN_CHANGE
idEditCtrl = (int) LOWORD(wParam); // identifier of edit control
hwndEditCtrl = (HWND) lParam; // handle of edit control
QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.