Click to open or copy the files for the Console sample.
The Console sample demonstrates most of the Win32 console functions. The program takes no parameters. After starting the sample, you can click one of the functions on the screen to see a demonstration of that function. While the demo is running, the title of the Console window changes to show the name of the source file where the demo function resides. This should make it easy to find the sample code where the function of interest resides.
Some of the demonstrations cover multiple console functions, so some of the choices run the same demo.
This sample uses the following keywords:
allocconsole; atoi; closehandle; cls; createconsolescreenbuffer; demoallocfree; demoapi; democoninfo; democonmode; democreate; democursor; demofillatt; demofillchar; demoflush; demogetlargest; demogetnumbut; demogetnumevents; demogettitle; demoinputcodepage; demooutputcodepage; demoreadconchar; demoreadconout; demoscrollcon; demosetctrlhandler; demosizeinfo; demowritein; exit; fillconsoleoutputattribute; fillconsoleoutputcharacter; flushconsoleinputbuffer; formatmessage; free; freeconsole; generateconsolectrlevent; getconsolecursorinfo; getconsolemode; getconsoleoutputcp; getconsolescreenbufferinfo; getconsoletitle; getconx; getcony; getlargestconsolewindowsize; getlasterror; getnumberofconsoleinputevents; getnumberofconsolemousebuttons; getstdhandle; getversionex; handler_routine; invertrectangle; isprint; localfree; makelangid; malloc; max; memcmp; memcpy; memset; messagebeep; messagebox; min; mygetchar; myputs; peekconsoleinput; perr; putstatusline; rawout; readconsoleinput; readconsoleoutput; readconsoleoutputattribute; readconsoleoutputcharacter; readfile; regenumvalue; regopenkeyex; resizeconbufandwindow; scrollconsolescreenbuffer; setconsoleactivescreenbuffer; setconsolectrlhandler; setconsolecursorinfo; setconsolecursorposition; setconsolemode; setconsoleoutputcp; setconsolescreenbuffersize; setconsoletextattribute; setconsoletitle; setconsolewindowinfo; setcontitle; setlocale; showconapis; showcp; sleep; sprintf; sscanf; strcat; strcpy; switch; writeconsole; writeconsoleinput; writeconsoleoutput; writeconsoleoutputattribute; writeconsoleoutputcharacter; writefile