Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Set Fullscreen mode

Set Fullscreen mode

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    soundman32
    wrote on last edited by
    #1

    Is there any way to programatically set/unset fullscreen console mode? Neil

    Z L 2 Replies Last reply
    0
    • S soundman32

      Is there any way to programatically set/unset fullscreen console mode? Neil

      Z Offline
      Z Offline
      zeki yugnak
      wrote on last edited by
      #2

      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; }

      S 1 Reply Last reply
      0
      • Z zeki yugnak

        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; }

        S Offline
        S Offline
        soundman32
        wrote on last edited by
        #3

        Erm, I was after full screen mode for console (text mode) programs, not GUI Neil

        W 1 Reply Last reply
        0
        • S soundman32

          Erm, I was after full screen mode for console (text mode) programs, not GUI Neil

          W Offline
          W Offline
          wb
          wrote on last edited by
          #4

          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:

          1 Reply Last reply
          0
          • S soundman32

            Is there any way to programatically set/unset fullscreen console mode? Neil

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups