There is no officially documented function for this. However, the following
code demonstrates the undocumented function in Windows NT (Intel only,
RISCs don't have a full-screen mode!):
/* This sample demonstrates the undocumented functions
GetConsoleDisplayMode() and
SetConsoleDisplayMode()
to set a console window to full-screen and query
the current full-screen/windowed status */
#include <windows.h>
WINBASEAPI
BOOL
WINAPI
GetConsoleDisplayMode(
LPDWORD dwConsoleDisplayMode
);
WINBASEAPI
DWORD
WINAPI
SetConsoleDisplayMode(
HANDLE hConsoleHandle,
DWORD dwConsoleDisplayMode,
LPDWORD dwPreviousDisplayMode
);
void main(void)
{
HANDLE hConsole;
DWORD Result;
AllocConsole();
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleDisplayMode(hConsole, 1, &Result);
};
Well, it doesn't really "demonstrate", it just switches a windowed DOS-box
to full-screen. You can play with the functions.
Still, I'd discourage anyone from making any use of this.
Windowed/full-screen is a USER PREFERENCE, that's probably what Microsoft
thought, too, and thus left the functions undocumented.
Regards,
--
Robert Schlabbach
e-mail: rob...@powerstation.isdn.cs.TU-Berlin.DE
Technical University of Berlin, Germany
>Still, I'd discourage anyone from making any use of this.
>Windowed/full-screen is a USER PREFERENCE, that's probably what Microsoft
>thought, too, and thus left the functions undocumented.
If Microsoft cared about user preferences, they would have given the user a
defense against programs stealing focus. But they see it as a user preference
to run such programs in the first place. Likewise, it's a user preference to
run a program that changes the user's settings.