Last Modification: February 25, 2000

How can I handle the arrow keys on a custom control on a dialog or CFormView?

The trick is telling the parent window what kind of input messages you want to handle, by handling the WM_GETDLGCODE message and returning the appropriate flags. To catch the arrow keys, you need to make sure you return the DLGC_WANTARROWS flag. Then youŽll receive the correct WM_KEYDOWN messages.

You can also handle this message to ensure you receive WM_CHAR and other messages.