I have a VisualC dialog based application that I'm having trouble with (on a Symbol PDT8100 PocketPC with WinCE3.0). This particular dialog has 3 edit boxes and 2 buttons, and I what I want to happen is that if the Enter key is pressed at any time while typing into the edit boxes, its the same as pressing one of the buttons.
I've only played with Visual C for a short period of time, but I would have expected WM_KEYDOWN or WM_CHAR to occur every time a character is typed into the edit boxes so I could just check for a VK_RETURN or something like that, but that isn't what happens. Every time any key is pressed, WM_COMMAND is sent (I can easily tell by just putting a MessageBeep inside WM_COMMAND - if I do the same for WM_KEYDOWN I hear nothing) and I don't seem to have any way to tell what key it was that was pressed, because in the case of wm_command I believe wParam refers to an identifier.
I tried, on WM_COMMAND, getting the buffer from the edit boxes and checking if the last character was a '\n', but apparently the enter key doesn't insert a newline into the buffer.
Any ideas? I'm sure its something simple I'm overlooking..