Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keyboard input

Status
Not open for further replies.

MeTarzan

Programmer
Jun 5, 2005
1
US
hi there!
i've got a simple problem. i'm trying to display the ekys pressed on the keyboard to the window using TextOut

i only need WM_CHAR characters.
i've tried using just WM_CHAR which is an integer and wParamr which is an integer too.

i'm guessing there's a simple solution?

thanx!
 
You could use either DirectInput but that takes a bit of reading. On the other hand, you could try the old Dos way of using _getch().
 
i've figured it out! (well with help from Jim Geyer!)

for anyone who's interested, Jim's response
"
you could code
char Ch;
later in code :
case WM_CHAR:
Ch = (char) wParam;
"

so using sprintf and TextOut, i've managed to dispaly the character as its typed from the keboard

thanks for suggestions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top