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. Prblm with SDI

Prblm with SDI

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
4 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.
  • B Offline
    B Offline
    balajeedurai
    wrote on last edited by
    #1

    Hai frens. . . I am facing a prblm in SDI. My SDI will be in maximized state initially. . . So, i do like this. . ShowWindow(SW_MAXIMIZE). After that i want that maximize button disabled so i remove the style WS_MAXIMIZEBOX. IF i do so the SDI will be maximized initially but it becomes MOVABLE. How to handle this. . .I need it to be immovable. Plz help me with this prblm Tanx

    V 1 Reply Last reply
    0
    • B balajeedurai

      Hai frens. . . I am facing a prblm in SDI. My SDI will be in maximized state initially. . . So, i do like this. . ShowWindow(SW_MAXIMIZE). After that i want that maximize button disabled so i remove the style WS_MAXIMIZEBOX. IF i do so the SDI will be maximized initially but it becomes MOVABLE. How to handle this. . .I need it to be immovable. Plz help me with this prblm Tanx

      V Offline
      V Offline
      Vikram Kashyap
      wrote on last edited by
      #2

      Hello, You can simply take the handle of the SystemMenu using GetSystemMenu and remove the Move menu. The code goes like this... void CMainFrame::DisableMoveWindow() { CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { pSysMenu->RemoveMenu(1, MF_BYPOSITION); } } Call this function in the OnCreate of CMainFrame() ;) Vikram Kashyap "You will never fail until you stop trying"

      B 2 Replies Last reply
      0
      • V Vikram Kashyap

        Hello, You can simply take the handle of the SystemMenu using GetSystemMenu and remove the Move menu. The code goes like this... void CMainFrame::DisableMoveWindow() { CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { pSysMenu->RemoveMenu(1, MF_BYPOSITION); } } Call this function in the OnCreate of CMainFrame() ;) Vikram Kashyap "You will never fail until you stop trying"

        B Offline
        B Offline
        balajeedurai
        wrote on last edited by
        #3

        Thanx Vikram prblm solved. .

        1 Reply Last reply
        0
        • V Vikram Kashyap

          Hello, You can simply take the handle of the SystemMenu using GetSystemMenu and remove the Move menu. The code goes like this... void CMainFrame::DisableMoveWindow() { CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { pSysMenu->RemoveMenu(1, MF_BYPOSITION); } } Call this function in the OnCreate of CMainFrame() ;) Vikram Kashyap "You will never fail until you stop trying"

          B Offline
          B Offline
          balajeedurai
          wrote on last edited by
          #4

          Thanx Vikram prblm solved. . .

          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