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. Minimum Window Size

Minimum Window Size

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiohelp
6 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.
  • B Offline
    B Offline
    BubbaGee
    wrote on last edited by
    #1

    I've looked through articles and in the forums but wasn't able to find what I needed. I'm trying to find a way to control the minimum size of the main/parent window so the user can't make it too small for the toolbar. I know there is a way to do it but for the live of me I can't find where to put the code. I created my initial code using MS Visual Studio MFC wizard so I have the standard classes. Any help would be appreciated. Thanks, Bubba

    Wishin'I was fishin'.

    T S 2 Replies Last reply
    0
    • B BubbaGee

      I've looked through articles and in the forums but wasn't able to find what I needed. I'm trying to find a way to control the minimum size of the main/parent window so the user can't make it too small for the toolbar. I know there is a way to do it but for the live of me I can't find where to put the code. I created my initial code using MS Visual Studio MFC wizard so I have the standard classes. Any help would be appreciated. Thanks, Bubba

      Wishin'I was fishin'.

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      BubbaGee wrote:

      Studio MFC wizard so I have the standard classes. Any help would be appreciated.

      handle WM_GETMINMAXINFO Notification

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

      1 Reply Last reply
      0
      • B BubbaGee

        I've looked through articles and in the forums but wasn't able to find what I needed. I'm trying to find a way to control the minimum size of the main/parent window so the user can't make it too small for the toolbar. I know there is a way to do it but for the live of me I can't find where to put the code. I created my initial code using MS Visual Studio MFC wizard so I have the standard classes. Any help would be appreciated. Thanks, Bubba

        Wishin'I was fishin'.

        S Offline
        S Offline
        see me
        wrote on last edited by
        #3

        Try with this WINDOWPLACEMENT WndpObj; WndpObj.ptMinPosition = CPoint( 25, 25 ); Fill other parameters. refer http://msdn2.microsoft.com/ko-kr/library/kb89946z.aspx[^] then call SetWindowPlacement( &WndpObj );

        Dream bigger... Do bigger...Expect smaller aji

        T 1 Reply Last reply
        0
        • S see me

          Try with this WINDOWPLACEMENT WndpObj; WndpObj.ptMinPosition = CPoint( 25, 25 ); Fill other parameters. refer http://msdn2.microsoft.com/ko-kr/library/kb89946z.aspx[^] then call SetWindowPlacement( &WndpObj );

          Dream bigger... Do bigger...Expect smaller aji

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          for that you have to handle WM_SIZE too

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

          S 1 Reply Last reply
          0
          • T ThatsAlok

            for that you have to handle WM_SIZE too

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

            cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

            S Offline
            S Offline
            see me
            wrote on last edited by
            #5

            Yaa...Need to handle WM_SIZE too:)

            Dream bigger... Do bigger...Expect smaller aji

            T 1 Reply Last reply
            0
            • S see me

              Yaa...Need to handle WM_SIZE too:)

              Dream bigger... Do bigger...Expect smaller aji

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              see me wrote:

              Yaa...Need to handle WM_SIZE too:)

              :)

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

              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