CompuServe Messages

#KEYDOWN/UP but no CHAR

    08-Jul-94 13:07:27
Sb: #29203-#KEYDOWN/UP but no CHAR
Fm: Sumeet Shrivastava 74441,172
To: Amtel Systems 73203,1441
Paul, You said that you were spying on your formview window and you were getting WM_KEYDOWN/UP messages but not WM_CHAR. Typically, you would not get those messages also in a formview. This is because if a formview has any controls, the focus would be with one of those controls and the control would receive the messages. So, if you are receiving WM_KEY messages, probably you don't have any controls. So, if the formview does not have any controls, why use a formview? Why not a simple view itself? Anyway, if you are not getting WM_CHAR, it could be because ::TranslateMessage is not being called for a formview. ::TranslateMessage is the function that converts the WM_KEYDOWN/UP to a WM_CHAR. The workaround would be to process the WM_KEYDOWN itself and check the virtual key code to see if it is a character. Paul, hope this helps. Thanks. Sumeet Shrivastava Microsoft Developer Support