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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. disabling maximize option in sdi window

disabling maximize option in sdi window

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
3 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.
  • N Offline
    N Offline
    neha agarwal27
    wrote on last edited by
    #1

    Hi all, I have made a sdi application. i want that my sdi application window should always remain in restore form it should never get maximized. How to disable maximize window option.... thanks in advance

    N A 2 Replies Last reply
    0
    • N neha agarwal27

      Hi all, I have made a sdi application. i want that my sdi application window should always remain in restore form it should never get maximized. How to disable maximize window option.... thanks in advance

      N Offline
      N Offline
      nitin3
      wrote on last edited by
      #2

      // m_pMainWnd->UpdateWindow(); //Add this code to the end of application's InitInstall Procedure SetWindowLong( m_pMainWnd->GetSafeHwnd() , GWL_STYLE , GetWindowLong(m_pMainWnd->GetSafeHwnd() , GWL_STYLE) & ~ WS_MINIMIZEBOX ) ;

      1 Reply Last reply
      0
      • N neha agarwal27

        Hi all, I have made a sdi application. i want that my sdi application window should always remain in restore form it should never get maximized. How to disable maximize window option.... thanks in advance

        A Offline
        A Offline
        Amar Sutar
        wrote on last edited by
        #3

        Add cs.style ^= WS_MAXIMIZEBOX; in PreCreateWindow method of CMainFrame BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if( !CFrameWnd::PreCreateWindow(cs) ) return FALSE; cs.style ^= WS_MAXIMIZEBOX; return TRUE; } :)Amar

        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