Original Post
🔒 Locked
Text programmers?
Advertisement
There are several ways to do this. The simplest would be this (compiled as a console app in MSVC):
That code should basically keeps reading in characters from the keyboard until you hit ESCAPE, and prints them out in the console.
However, given your reference to WM_CHAR I think you might be wanting to do this as a Win32 app, not a console one. This is a little more difficult to pseudocode. Basically, you want to set up a normal window (there are countless tutorials on the web about this; you can also make a basic "hello world!" app in MSVC with a few clicks of the mouse.) Once you've done that you want to respond to the WM_CHAR message by somehow displaying the wParam associated with that message. If you need more help with this I could write some real code for you
PS, You might have to be more specific in the future to get more specific help. WM_CHAR isn't exactly a command and I don't see where a for loop fits in, so it's a little difficult to understand what you're asking for, but I try

Edited by - SHilbert on November 30, 2001 12:06:22 AM
|
That code should basically keeps reading in characters from the keyboard until you hit ESCAPE, and prints them out in the console.
However, given your reference to WM_CHAR I think you might be wanting to do this as a Win32 app, not a console one. This is a little more difficult to pseudocode. Basically, you want to set up a normal window (there are countless tutorials on the web about this; you can also make a basic "hello world!" app in MSVC with a few clicks of the mouse.) Once you've done that you want to respond to the WM_CHAR message by somehow displaying the wParam associated with that message. If you need more help with this I could write some real code for you
PS, You might have to be more specific in the future to get more specific help. WM_CHAR isn't exactly a command and I don't see where a for loop fits in, so it's a little difficult to understand what you're asking for, but I try
Edited by - SHilbert on November 30, 2001 12:06:22 AM
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement