mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:05:49 +00:00
- Add missing svn:eol-style properties.
- Use consistent newline style. - Update file COPYING. svn path=/trunk/; revision=43817
This commit is contained in:
parent
008b7c72d8
commit
c9c4571300
13 changed files with 803 additions and 804 deletions
|
@ -1,33 +1,33 @@
|
|||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
#include <windows.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
TCHAR Buffer = 0;
|
||||
DWORD Count = 0;
|
||||
|
||||
//
|
||||
// We clear the mode, most importantly turn off ENABLE_ECHO_INPUT and ENABLE_LINE_INPUT
|
||||
// This is the same mode as that is set up by getch() when trying to get a char
|
||||
//
|
||||
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),0);
|
||||
|
||||
//
|
||||
// We read one char from the input and then return
|
||||
//
|
||||
ReadConsole(GetStdHandle(STD_INPUT_HANDLE),&Buffer,1,&Count,NULL);
|
||||
|
||||
//
|
||||
// We print out this char as an int to show that infact a backspace does count as input
|
||||
//
|
||||
_tprintf(TEXT("You printed %c :: "), Buffer);
|
||||
_tprintf(TEXT("With a value %d :: "), Buffer);
|
||||
_tprintf(TEXT("Number of chars recieved %lu :: "), Count);
|
||||
_tprintf(TEXT("Char equal to backspace %d \n"), (Buffer == TEXT('\b')));
|
||||
|
||||
//
|
||||
// :)
|
||||
//
|
||||
return 0;
|
||||
}
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
#include <windows.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
TCHAR Buffer = 0;
|
||||
DWORD Count = 0;
|
||||
|
||||
//
|
||||
// We clear the mode, most importantly turn off ENABLE_ECHO_INPUT and ENABLE_LINE_INPUT
|
||||
// This is the same mode as that is set up by getch() when trying to get a char
|
||||
//
|
||||
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),0);
|
||||
|
||||
//
|
||||
// We read one char from the input and then return
|
||||
//
|
||||
ReadConsole(GetStdHandle(STD_INPUT_HANDLE),&Buffer,1,&Count,NULL);
|
||||
|
||||
//
|
||||
// We print out this char as an int to show that infact a backspace does count as input
|
||||
//
|
||||
_tprintf(TEXT("You printed %c :: "), Buffer);
|
||||
_tprintf(TEXT("With a value %d :: "), Buffer);
|
||||
_tprintf(TEXT("Number of chars recieved %lu :: "), Count);
|
||||
_tprintf(TEXT("Char equal to backspace %d \n"), (Buffer == TEXT('\b')));
|
||||
|
||||
//
|
||||
// :)
|
||||
//
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue