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. How to remove MAXIMIZE Option from SDI application

How to remove MAXIMIZE Option from SDI application

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
5 Posts 5 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
    snprani
    wrote on last edited by
    #1

    Hi How to remove MAXIMIZE Option from SDI application (at right upper corner). In this application the View class is derived from CFormView. Plz help me as soon as possible. Thanks in Advance.

    P G 2 Replies Last reply
    0
    • S snprani

      Hi How to remove MAXIMIZE Option from SDI application (at right upper corner). In this application the View class is derived from CFormView. Plz help me as soon as possible. Thanks in Advance.

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      use following window style while creating window ie in CreateWindow() function WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX this will disable maximize icon

      R 1 Reply Last reply
      0
      • P prasad_som

        use following window style while creating window ie in CreateWindow() function WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX this will disable maximize icon

        R Offline
        R Offline
        Rajesh match
        wrote on last edited by
        #3

        for SDI BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { cs.style = WS_OVERLAPPED | WS_SYSMENU | WS_BORDER; return CFrameWnd::PreCreateWindow(cs); } for MDI BOOL CMyChildWnd::PreCreateWindow(CREATESTRUCT& cs) { cs.style &= ~WS_MAXIMIZEBOX; return CMDIChildWnd::PreCreateWindow(cs); }

        V 1 Reply Last reply
        0
        • R Rajesh match

          for SDI BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { cs.style = WS_OVERLAPPED | WS_SYSMENU | WS_BORDER; return CFrameWnd::PreCreateWindow(cs); } for MDI BOOL CMyChildWnd::PreCreateWindow(CREATESTRUCT& cs) { cs.style &= ~WS_MAXIMIZEBOX; return CMDIChildWnd::PreCreateWindow(cs); }

          V Offline
          V Offline
          vikas amin
          wrote on last edited by
          #4

          hey i want to maximise my Child window similarly when the user clicks the MAXIMIZEBOX button . Is it possible programatically or not ? Vikas Amin Embin Technology Bombay vikas.amin@embin.com

          1 Reply Last reply
          0
          • S snprani

            Hi How to remove MAXIMIZE Option from SDI application (at right upper corner). In this application the View class is derived from CFormView. Plz help me as soon as possible. Thanks in Advance.

            G Offline
            G Offline
            G Haranadh
            wrote on last edited by
            #5

            Hey, Sorry for late. just i came. This is also one way.

            CDialog dlg;//This can be any window
            dlg.ModifyStyle(WS_MAXIMIZEBOX,0);//To remove the max btn.
            dlg.ModifyStyle(0,WS_MAXIMIZEBOX);//To add the max btn

            //Like this you can add any style and remove any style This is simple way. At runtime you can change the style of any control or any window. see about modifystyle in msdn. Nice talking to you. :-O

            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