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. full screen

full screen

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
2 Posts 2 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.
  • W Offline
    W Offline
    wong1907
    wrote on last edited by
    #1

    How to initialize a child frame window in full screen mode? :-D

    S 1 Reply Last reply
    0
    • W wong1907

      How to initialize a child frame window in full screen mode? :-D

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      Try this (where pChild is the child):

      CRect rectSave;
      pChild->GetWindowRect(&rectSave);
      pChild->SetParent(NULL);
      pChild->ModifyStyle(WS_CHILDWINDOW, WS_OVERLAPPED);
      pChild->ModifyStyleEx(WS_EX_STATICEDGE,WS_EX_WINDOWEDGE,SWP_FRAMECHANGED);

        WINDOWPLACEMENT wp;
        memset(&wp,0,sizeof(wp));
        wp.length = sizeof(wp);
        wp.ptMaxPosition.x = wp.ptMaxPosition.y = 0;
        wp.rcNormalPosition = rectSave;
        wp.showCmd = SW\_MAXIMIZE;
      

      pChild->SetWindowPlacement(&wp);

      When you're done being full screen, just reverse the process (restore previous size and styles, make a child again).

      ---

      Shog9 Actually I use to find learning in bars when drinking really useful. It sort of makes a language liquid. - Colin Davies, Thinking in English?

      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