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. Fixed Size Formview ???

Fixed Size Formview ???

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestionlearning
5 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.
  • 2 Offline
    2 Offline
    2sky
    wrote on last edited by
    #1

    Can anyone tell me how to disable the maximize/minimizebox and the ability to resize from a CFormview object? In other words make the formview look like a regular dialog. I tried to set the settings in my resource to fixed size but the formview still allows me to resize...

    I 1 Reply Last reply
    0
    • 2 2sky

      Can anyone tell me how to disable the maximize/minimizebox and the ability to resize from a CFormview object? In other words make the formview look like a regular dialog. I tried to set the settings in my resource to fixed size but the formview still allows me to resize...

      I Offline
      I Offline
      Igor Sukhov
      wrote on last edited by
      #2

      Your should override CChildFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) method. Within this method set the lpMMI->ptMaxTrackSize and lpMMI->ptMaxTrackSize to size your want your form to be. Best regards, ----------- Igor Soukhov (Brainbench/Tekmetrics ID:50759) igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru

      2 1 Reply Last reply
      0
      • I Igor Sukhov

        Your should override CChildFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) method. Within this method set the lpMMI->ptMaxTrackSize and lpMMI->ptMaxTrackSize to size your want your form to be. Best regards, ----------- Igor Soukhov (Brainbench/Tekmetrics ID:50759) igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru

        2 Offline
        2 Offline
        2sky
        wrote on last edited by
        #3

        Can't I disable or hide the minimize or maximize boxes ??? I tried to remove it from the style in the PreCreateWindow method, but they still appear...

        I 1 Reply Last reply
        0
        • 2 2sky

          Can't I disable or hide the minimize or maximize boxes ??? I tried to remove it from the style in the PreCreateWindow method, but they still appear...

          I Offline
          I Offline
          Igor Sukhov
          wrote on last edited by
          #4

          Try it again ;) BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs cs.style &= ~(WS_MINIMIZEBOX | WS_MAXIMIZEBOX); if( !CMDIChildWnd::PreCreateWindow(cs) ) return FALSE; return TRUE; } The code above works - the frame window appeared without MAXIMIZE & MINIMIZE buttons. Best regards, ----------- Igor Soukhov (Brainbench/Tekmetrics ID:50759) igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru

          2 1 Reply Last reply
          0
          • I Igor Sukhov

            Try it again ;) BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs cs.style &= ~(WS_MINIMIZEBOX | WS_MAXIMIZEBOX); if( !CMDIChildWnd::PreCreateWindow(cs) ) return FALSE; return TRUE; } The code above works - the frame window appeared without MAXIMIZE & MINIMIZE buttons. Best regards, ----------- Igor Soukhov (Brainbench/Tekmetrics ID:50759) igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru

            2 Offline
            2 Offline
            2sky
            wrote on last edited by
            #5

            Indeed you're right :) I think I was mixing things together with too much trial and error :) Thanks :-D

            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