Sending keyboard text to a static text box
Posted on 2007-10-12
I am trying to create a simple C++ App under WTL that contains a little routine to pass a few words of text typed from the keyboard so that it appears in a static text box (I dont want to use an Edit box for this if it is possible to avoid it). I have tried to intercept keyboard commands but because it is a static text box no windows messages eg. WM_CHAR are generated. I can see other windows messages with Spy++(WM_GETTEXT etc) sent to the correct window when I press a key but my message handler will not intercept these, (I assume the Windows System has got there first). I can set the focus and create a flashing cursor etc in the static text box and write a programm created string to it under program control, without any problems. Any ideas how to do this trivial task please?