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. removing the maximize box

removing the maximize box

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 3 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.
  • G Offline
    G Offline
    genush
    wrote on last edited by
    #1

    Is there a way to remove the maximize box from the view title bar in a multidoc app? I used DeleteMenu(*) or ModifyStyle(*) to disable the maximize button but these do not remove the button from the title bar. Thanks in advance.

    G L 2 Replies Last reply
    0
    • G genush

      Is there a way to remove the maximize box from the view title bar in a multidoc app? I used DeleteMenu(*) or ModifyStyle(*) to disable the maximize button but these do not remove the button from the title bar. Thanks in advance.

      G Offline
      G Offline
      Gavin Taylor
      wrote on last edited by
      #2

      When you create the window dont set the WS_MAXIMIZEBOX style, if your using MFC check under the CWnd::PreCreateWindow method of your windows class and you can change the style from there before the window is created.

      Gavin Taylor

      G 1 Reply Last reply
      0
      • G Gavin Taylor

        When you create the window dont set the WS_MAXIMIZEBOX style, if your using MFC check under the CWnd::PreCreateWindow method of your windows class and you can change the style from there before the window is created.

        Gavin Taylor

        G Offline
        G Offline
        genush
        wrote on last edited by
        #3

        Hmmm, I tried that in the CMainFrame::PreCreateWindow(CREATESTRUCT& cs) by setting: cs.style &= ~WS_MAXIMIZEBOX before the call to CMDIFrameWnd::PreCreateWindow(cs) which disabled the maximize box but did not remove the button from the title bar. Am I doing that wrong?

        1 Reply Last reply
        0
        • G genush

          Is there a way to remove the maximize box from the view title bar in a multidoc app? I used DeleteMenu(*) or ModifyStyle(*) to disable the maximize button but these do not remove the button from the title bar. Thanks in advance.

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

          I think that you will need to remove them both because you cannot remove only one of them using standard API calls. I had to overcome the same problem when I was writing a window skin engine. Applications cannot create an overlapped or a popup window that contains only the Minimize or the Maximize button.[^] Best Wishes, -David Delaune

          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