Click to Rate and Give Feedback
MSDN
MSDN Library
System Services
Console Reference
Console Functions
Console Functions

The following functions are used to access a console.

FunctionDescription
AddConsoleAliasDefines a console alias for the specified executable.
AllocConsoleAllocates a new console for the calling process.
AttachConsoleAttaches the calling process to the console of the specified process.
CreateConsoleScreenBufferCreates a console screen buffer.
FillConsoleOutputAttributeSets the text and background color attributes for a specified number of character cells.
FillConsoleOutputCharacterWrites a character to the console screen buffer a specified number of times.
FlushConsoleInputBufferFlushes the console input buffer.
FreeConsoleDetaches the calling process from its console.
GenerateConsoleCtrlEventSends a specified signal to a console process group that shares the console associated with the calling process.
GetConsoleAliasRetrieves the specified alias for the specified executable.
GetConsoleAliasesRetrieves all defined console aliases for the specified executable.
GetConsoleAliasesLengthReturns the size, in bytes, of the buffer needed to store all of the console aliases for the specified executable.
GetConsoleAliasExesRetrieves the names of all executables with console aliases defined.
GetConsoleAliasExesLengthReturns the size, in bytes, of the buffer needed to store the names of all executables that have console aliases defined.
GetConsoleCPRetrieves the input code page used by the console associated with the calling process.
GetConsoleCursorInfoRetrieves information about the size and visibility of the cursor for the specified console screen buffer.
GetConsoleDisplayModeRetrieves the display mode of the current console.
GetConsoleFontSizeRetrieves the size of the font used by the specified console screen buffer.
GetConsoleHistoryInfoRetrieves the history settings for the calling process's console.
GetConsoleModeRetrieves the current input mode of a console's input buffer or the current output mode of a console screen buffer.
GetConsoleOriginalTitleRetrieves the original title for the current console window.
GetConsoleOutputCPRetrieves the output code page used by the console associated with the calling process.
GetConsoleProcessListRetrieves a list of the processes attached to the current console.
GetConsoleScreenBufferInfoRetrieves information about the specified console screen buffer.
GetConsoleScreenBufferInfoExRetrieves extended information about the specified console screen buffer.
GetConsoleSelectionInfoRetrieves information about the current console selection.
GetConsoleTitleRetrieves the title for the current console window.
GetConsoleWindowRetrieves the window handle used by the console associated with the calling process.
GetCurrentConsoleFontRetrieves information about the current console font.
GetCurrentConsoleFontExRetrieves extended information about the current console font.
GetLargestConsoleWindowSizeRetrieves the size of the largest possible console window.
GetNumberOfConsoleInputEventsRetrieves the number of unread input records in the console's input buffer.
GetNumberOfConsoleMouseButtonsRetrieves the number of buttons on the mouse used by the current console.
GetStdHandleRetrieves a handle for the standard input, standard output, or standard error device.
HandlerRoutineAn application-defined function used with the SetConsoleCtrlHandler function.
PeekConsoleInputReads data from the specified console input buffer without removing it from the buffer.
ReadConsoleReads character input from the console input buffer and removes it from the buffer.
ReadConsoleInputReads data from a console input buffer and removes it from the buffer.
ReadConsoleOutputReads character and color attribute data from a rectangular block of character cells in a console screen buffer.
ReadConsoleOutputAttributeCopies a specified number of foreground and background color attributes from consecutive cells of a console screen buffer.
ReadConsoleOutputCharacterCopies a number of characters from consecutive cells of a console screen buffer.
ScrollConsoleScreenBufferMoves a block of data in a screen buffer.
SetConsoleActiveScreenBufferSets the specified screen buffer to be the currently displayed console screen buffer.
SetConsoleCPSets the input code page used by the console associated with the calling process.
SetConsoleCtrlHandlerAdds or removes an application-defined HandlerRoutine from the list of handler functions for the calling process.
SetConsoleCursorInfoSets the size and visibility of the cursor for the specified console screen buffer.
SetConsoleCursorPositionSets the cursor position in the specified console screen buffer.
SetConsoleDisplayModeSets the display mode of the specified console screen buffer.
SetConsoleHistoryInfoSets the history settings for the calling process's console.
SetConsoleModeSets the input mode of a console's input buffer or the output mode of a console screen buffer.
SetConsoleOutputCPSets the output code page used by the console associated with the calling process.
SetConsoleScreenBufferInfoExSets extended information about the specified console screen buffer.
SetConsoleScreenBufferSizeChanges the size of the specified console screen buffer.
SetConsoleTextAttributeSets the foreground (text) and background color attributes of characters written to the console screen buffer.
SetConsoleTitleSets the title for the current console window.
SetConsoleWindowInfoSets the current size and position of a console screen buffer's window.
SetCurrentConsoleFontExSets extended information about the current console font.
SetStdHandleSets the handle for the standard input, standard output, or standard error device.
WriteConsoleWrites a character string to a console screen buffer beginning at the current cursor location.
WriteConsoleInputWrites data directly to the console input buffer.
WriteConsoleOutputWrites character and color attribute data to a specified rectangular block of character cells in a console screen buffer.
WriteConsoleOutputAttributeCopies a number of foreground and background color attributes to consecutive cells of a console screen buffer.
WriteConsoleOutputCharacterCopies a number of characters to consecutive cells of a console screen buffer.

Send comments about this topic to Microsoft

Build date: 11/6/2008

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
SetConsoleIcon function      Đonny   |   Edit   |  
There is also undocumented function SetConsoleIcon

''' <summary>Sets console icon</summary>
''' <param name="hicon">Handle of icon (<see cref="Icon.Handle"/>)</param>
''' <returns>True of succes, false on error</returns>
''' <remarks>This function is undocumented</remarks>
Public Declare Function SetConsoleIcon Lib "Kernel32.dll" (ByVal hicon As IntPtr) As Boolean

  • http://support.microsoft.com/kb/124103 describes how to get handle of console window.
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker