Your application must share the system console with other applications. Because of this, the Windows versions of the C run-time libraries exclude the following C run-time console-input-and-output functions:
cgets
cprintf
cputs
getch
getche
kbhit
putch
ungetch
Since it cannot use these functions, your application should accept console input through the WM_KEYDOWN, WM_KEYUP, and WM_CHAR messages to your window and dialog box procedures. If you require more advanced techniques, you can call the PeekMessage function to look ahead at keyboard input, or you can install a keyboard filter function in a dynamic-link library by calling the SetWindowsHook function.