Set Fullscreen mode
-
Is there any way to programatically set/unset fullscreen console mode? Neil
-
Is there any way to programatically set/unset fullscreen console mode? Neil
hi.. this way is not exactly same yours however you can use.
//ID_VIEW_FULLSCREEN on menu void CMainFrame::OnViewFullscreen() { if (m_fullscreen) { ModifyStyle(0,WS_CAPTION|WS_THICKFRAME); ShowWindow(SW_SHOWNORMAL); ShowControlBar(&m_wndToolBar, TRUE, FALSE); ShowControlBar(&m_wndStatusBar, TRUE, FALSE); } else { ModifyStyle(WS_CAPTION|WS_THICKFRAME,0); ShowWindow(SW_MAXIMIZE); CFrameWnd* pChild = GetActiveFrame(); if (pChild) pChild->ShowWindow(SW_MAXIMIZE); ShowControlBar(&m_wndToolBar, FALSE, FALSE); ShowControlBar(&m_wndStatusBar, FALSE, FALSE); } m_fullscreen = !m_fullscreen; }
-
hi.. this way is not exactly same yours however you can use.
//ID_VIEW_FULLSCREEN on menu void CMainFrame::OnViewFullscreen() { if (m_fullscreen) { ModifyStyle(0,WS_CAPTION|WS_THICKFRAME); ShowWindow(SW_SHOWNORMAL); ShowControlBar(&m_wndToolBar, TRUE, FALSE); ShowControlBar(&m_wndStatusBar, TRUE, FALSE); } else { ModifyStyle(WS_CAPTION|WS_THICKFRAME,0); ShowWindow(SW_MAXIMIZE); CFrameWnd* pChild = GetActiveFrame(); if (pChild) pChild->ShowWindow(SW_MAXIMIZE); ShowControlBar(&m_wndToolBar, FALSE, FALSE); ShowControlBar(&m_wndStatusBar, FALSE, FALSE); } m_fullscreen = !m_fullscreen; }
Erm, I was after full screen mode for console (text mode) programs, not GUI Neil
-
Erm, I was after full screen mode for console (text mode) programs, not GUI Neil
hm.. I never did it, but perhaps by finding the window of the console. and then sending "Alt+Enter" to it?!? Use EnumWindows(), So you can find the ConsoleWindow. it has the name of your app in the title. and then send the "go full screen" magic "Alt+Enter":rolleyes:
-
Is there any way to programatically set/unset fullscreen console mode? Neil
Functional but not very elegant - this sends a Ctrl+Enter to the console window:
#include #include int _tmain(int argc, _TCHAR* argv[]) { keybd_event( VK_MENU, MapVirtualKey( VK_MENU, 0 ), 0, 0 ); keybd_event( VK_RETURN, MapVirtualKey( VK_RETURN, 0 ), 0, 0 ); keybd_event( VK_RETURN, MapVirtualKey( VK_RETURN, 0 ), KEYEVENTF_KEYUP, 0 ); keybd_event( VK_MENU, MapVirtualKey( VK_MENU, 0 ), KEYEVENTF_KEYUP, 0 ); getch(); return 0; }
Displaced Aussie. Currently in London, normally living in Melbourne.