UI feature request

Max Zinal Zlat0 at mail.ru
Thu Jan 22 21:03:39 CET 2004


David Shaw wrote:
> 
> Okay, it's in 1.3.5.  There is no change on Windows - if someone knows
> a simple way to get the size of a command.com/cmd.exe shell window,
> let me know.
> 

Something like that:

--- begin untested C code ---

HANDLE hStdOut;
CONSOLE_SCREEN_BUFFER_INFO csbiInfo;

hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
if ( hStdOut==INVALID_HANDLE_VALUE )
   ; /* Error - we don't have stdout at all. Strange a bit.
        We might want to call GetLastError() to get some reason */

if (! GetConsoleScreenBufferInfo(hStdOut, &csbiInfo))
   ; /* No limits at all - output is not a console? */

/* Now we have maximum width as csbiInfo.dwSize.X
    and maximum height as csbiInfo.dwSize.Y */

--- end untested C code ---

MSDN is a huge peace of useful stuff - at least for the Windows world :)




More information about the Gnupg-devel mailing list