Friday, 28 November 2003


On a bit of a roll tonight, don't worry, won't last.

Raymond Chen talks about WM_GETDLGCODE. Handle this message to customise how the dialog interaction works. By default Windows dialogs process a number of keys themselves (via a call to IsDialogMessage). Plugging in at this level is much cleaner than overriding PreTranslateMessage, which is what most MFC coders do.

We've used this for UIs where the customer wanted to navigate between entry fields using Enter (Return) – which is of course specifically condemned by most UI gurus (using a GUI as if it were a text-based interface)! However, their users are normally used to it.

No comments: