views:

517

answers:

2

Is it possible to programmatically set such windows console parameters as its left-top desktop position, console font, fast insert and selection by mouse options, etc. ?

EDIT Unfortunately we can set some console parameters by invoking undocumented Windows API. For example: SetConsoleFont, GetConsoleFontInfo, GetNumberOfConsoleFonts from KERNEL32.DLL.

+2  A: 

In order to reposition the console you need to update the underlying HWND. You can use the GetConsoleWindow() function to get a handle to the HWND. From there you can call GetWindowInfo, SetWindowINfo and the like to update it's postition and size

http://msdn.microsoft.com/en-us/library/ms683175(VS.85).aspx

EDIT The below is actually for updating the buffer.

I believe you are looking for the SetConsoleWindowInfo function. This will allow you to control positioning of the Console Window.

http://msdn.microsoft.com/en-us/library/ms686125(VS.85).aspx

JaredPar
No. SetConsoleWindowInfo function manages character cells numebr of displayable window in console screen buffer. I need handling the position (in pixels) of console window in Windows desktop.
macropas
It's great!(using GetConsoleWindow() to obtain HWND). But what do you think about font and other console parameters?
macropas
A: 

Fonts and ahything else can be set with undocumented Win32 apis
See Win32 api newsgroup for all undocumented apis (Google Groups)