Hi guys,
I'm running Visual Studio 2010 C++ Express on Windows 7 and I was just wondering how to make the debug screen in full screen.

So
Any Help is Appreciated.

Thanks

Here's my feeble attempt:

#define _WIN32_WINNT 0x0601
#include <windows.h> 
// when you use Windows.h it should be the first header
// you include, because windows.h is really quite picky and lame about that sort
// of thing.
#include <iostream>

void DoFullscreen(HANDLE hOutput)
{
	BOOL result = SetConsoleDisplayMode(hOutput, CONSOLE_FULLSCREEN_MODE, NULL);
	if( !result )
		std::cerr << "Last error: " << GetLastError() << std::endl;
}

int main()
{
	std::cout << "Running test one.. " << endl;
	// One of these structures.
	CONSOLE_SCREEN_BUFFER_INFOEX bufferInfo = {0};
	bufferInfo.cbSize = sizeof(CONSOLE_SCREEN_BUFFER_INFOEX);
	// Get a handle to the console window.
        HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
	if(hOutput == INVALID_HANDLE_VALUE)
		std::cerr << "GetStdHandle() -> " << GetLastError() << std::endl;
	// Fill bufferInfo with the window information, using the window handle.
	if(!GetConsoleScreenBufferInfoEx(hOutput, &bufferInfo))
		std::cerr << "GetConsoleScreenBufferInfo() -> " << GetLastError() << std::endl;
	// If full-screen mode is supported (it's not on W7 and Vista)
	if(bufferInfo.bFullscreenSupported)
	{
		std::cout << "Good news, your system supports full-screen!" << std::endl;
		DoFullscreen(hOutput);
	}
	// Set current size to maximum.
	else
	{
		bufferInfo.dwSize = bufferInfo.dwMaximumWindowSize;
		// Set the new console screen buffer info structure.
		if(!SetConsoleScreenBufferInfoEx(hOutput, &bufferInfo))
			std::cerr << "SetConsoleScreenBufferInfo() -> " << GetLastError() << std::endl;
	}
        std::cout << "Press ENTER to continue..." << std::endl;
        std::cin.get();
	std::cout << "Running test two.. " << endl;
	HWND hConsoleWindow = GetConsoleWindow();
	if(hConsoleWindow == NULL)
		std::cerr << "GetConsoleWindow() -> " << GetLastError() << std::endl;
	ShowWindow(hConsoleWindow,SW_MAXIMIZE);
	std::cout << "Press ENTER to continue..." << std::endl;
        std::cin.get();
	return ERROR_SUCCESS;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.