I'm making a C++ program that displays a user input of only 1 character, so basicly it's the same as doing this:
char x; cin >> x; previouslyDefinedVar = x;
But my program is GUI and I'm definitely not using the command box. Also, the input character should be submitted once the user presses a key, so he doesn't have to hit ENTER or click on a Submit button. This is not a kind of key logger, the input window should be visible. And please explain your code, I won't use any code if I don't understand it. I'm using Code::Blocks 13.12 on Windows 8.
To make myself clear, I want someone to write a code that displays a dialog box and gets the user input of 1 character into a variable.