Archived

This topic is now archived and is closed to further replies.

RelisH

Problems with String input

Recommended Posts

I''ve figured out how to get input from the user so that it can be used for a textbox or something. And it works quite well, except for one part, you have to type very slow! For example, typing "The", results in just "te", since the h and he keys are pressed at about the same time. The way mine works is by checking which keys have gone back up which were previously down. This is getting to be a huge problem, and I haven''t a clue as to how this problem is going to be solved.

Share this post


Link to post
Share on other sites
Put a TranslateMessage() in your message pump and respond to WM_CHAR messages.

Those will be buffered and it''s the easiest and most robust method of handling international keyboards which aren''t the same as the default DirectInput key mapping (try getting an accented character on a Danish keyboard or a Q on a French keyboard using DInput - you''ll see what I mean). DirectInput is intended for getting control input, not text input (Microsoft have said this themselves).

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites