Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2005 express full screen console mode issues

Status
Not open for further replies.

grexroad

Programmer
Jan 30, 2008
7
US
I'm using 2005 express and need to see the code that will allow me to view full screen in console mode. I've looked online and found code but I have windows.h issues that I just can not resolve. With the 2003 edition I was able to have full screen with the following code. It does not work with 2005 express though. Anyony have any code that would help?


void fullScreen(void)
{
typedef BOOL (WINAPI *PROCSETCONSOLEDISPLAYMODE)(HANDLE,DWORD,LPDWORD);
typedef BOOL (WINAPI *PROCGETCONSOLEDISPLAYMODE)(LPDWORD);
PROCSETCONSOLEDISPLAYMODE SetConsoleDisplayMode;
PROCGETCONSOLEDISPLAYMODE GetConsoleDisplayMode;
HMODULE hKernel32 = GetModuleHandle("kernel32");
SetConsoleDisplayMode = (PROCSETCONSOLEDISPLAYMODE )
GetProcAddress(hKernel32,"SetConsoleDisplayMode");
GetConsoleDisplayMode = (PROCGETCONSOLEDISPLAYMODE)
GetProcAddress(hKernel32,"GetConsoleDisplayMode");
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
DWORD dwOldMode;
SetConsoleDisplayMode(hOut,1,&dwOldMode);
setColor(0, 4);
system("cls");
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top