Can WM_NEXTDLGCTL be used with non-dialog windows?

The documentation for WM_NEXTDLGCTL states, that this message is to be used with dialogs:

Sent to a dialog box procedure to set the keyboard focus to a different control in the dialog box.

If this message cannot be used with non-dialog control parents, it would be very tedious to subclass controls in a generic way (as illustrated in this question), since the window procedure would have to call either SetFocus or send a WM_NEXTDLGCTL message, based on not quite trivial to determine context.

Since other dialog-specific APIs can be used with non-dialog windows (e.g. IsDialogMessage), it would feel natural to be able to use WM_NEXTDLGCTL in this setup as well.

Question: Can WM_NEXTDLGCTL be used with non-dialog control parents?


Source: c++

Leave a Reply