2

I have an edit control. In the parent window I'm listening a WM_COMMAND message. But my control doesn't send it on change. Moreover, when I'm watching messages with Spy I can see only different keyboard messages on the edit control itself and the only message in the main parent window is WM_CTLCOLOREDIT.

P.S.: The only interesting thing I'm doing - I'm creating an edit with HWND_MESSAGE parent and assign a parent later with SetParent();

4

1 に答える 1

3

エディット コントロールの場合、通知はコントロールの元の親に送信されます。つまり、あなたの場合、メッセージのみのウィンドウです。

同様の質問へのコメントで、Raymond Chen は次のように述べています。

多くのコントロールは元の親をキャッシュします。あなたがそれについてできることはあまりありません。

親を作成するまで、エディット コントロールの作成を延期することをお勧めします。

于 2015-06-08T12:41:01.430 に答える