| | |
Full screen console applications
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Hey,
I have a problem using Visual Studio 2005. In the MSDN library it says there is a function called SetConsoleDisplayMode. This function though is not in the 2005 library. I'm assuming its an old reference from VS 2003. Does anyone know how to tell a console program to switch into full screen mode?
Any help is appreciated.
- Daniel
I have a problem using Visual Studio 2005. In the MSDN library it says there is a function called SetConsoleDisplayMode. This function though is not in the 2005 library. I'm assuming its an old reference from VS 2003. Does anyone know how to tell a console program to switch into full screen mode?
Any help is appreciated.
- Daniel
Here's a code snippet which I found.
C++ Syntax (Toggle Plain Text)
#include <windows.h> #include <iostream> BOOL NT_SetConsoleDisplayMode(HANDLE hOutputHandle, DWORD dwNewMode) { typedef BOOL (WINAPI *SCDMProc_t) (HANDLE, DWORD, LPDWORD); SCDMProc_t SetConsoleDisplayMode; HMODULE hKernel32; BOOL bFreeLib = FALSE, ret; const char KERNEL32_NAME[] = "kernel32.dll"; hKernel32 = GetModuleHandleA(KERNEL32_NAME); if (hKernel32 == NULL) { hKernel32 = LoadLibraryA(KERNEL32_NAME); if (hKernel32 == NULL) return FALSE; bFreeLib = true; }//if SetConsoleDisplayMode = (SCDMProc_t)GetProcAddress(hKernel32, "SetConsoleDisplayMode"); if (SetConsoleDisplayMode == NULL) { SetLastError(ERROR_CALL_NOT_IMPLEMENTED); ret = FALSE; }//if else { DWORD dummy; ret = SetConsoleDisplayMode(hOutputHandle, dwNewMode, &dummy); }//else if (bFreeLib) FreeLibrary(hKernel32); return ret; }//NT_SetConsoleDisplayMode int main( void ) { NT_SetConsoleDisplayMode( GetStdHandle( STD_OUTPUT_HANDLE ), 1 ); std::cin.get(); return 0; }
![]() |
Similar Threads
- full screen applet in java (Java)
- Full screen prob (Shell Scripting)
- Why can't I view "full screen" in Preview? (Mac Software)
- How to make console programs full screen? (C++)
- Full Screen (Java)
Other Threads in the C++ Forum
- Previous Thread: my #include <string> wont make "string" bold
- Next Thread: DLL that returns a pointer
| Thread Tools | Search this Thread |
api array based binary bitmap c++ c/c++ calculator char char* class classes code coding compile console conversion database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news node number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





