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. Enlarging dialog window

Enlarging dialog window

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
4 Posts 4 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
    sweep123
    wrote on last edited by
    #1

    How can you handle the case where you want to put a Max limit on the size that you can make a MFC dialog based application window. I store the main dialog windows size in the InitDialog routine, but how do you limit the resizing? I placed code in the OnSize, but it did not work.

    R E M 3 Replies Last reply
    0
    • S sweep123

      How can you handle the case where you want to put a Max limit on the size that you can make a MFC dialog based application window. I store the main dialog windows size in the InitDialog routine, but how do you limit the resizing? I placed code in the OnSize, but it did not work.

      R Offline
      R Offline
      Roger Allen
      wrote on last edited by
      #2

      WM_GETMINMAXINFO message. Process this and return the minimum and maximum sizes the user can change for the window Roger Allen - Sonork 100.10016 Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...

      1 Reply Last reply
      0
      • S sweep123

        How can you handle the case where you want to put a Max limit on the size that you can make a MFC dialog based application window. I store the main dialog windows size in the InitDialog routine, but how do you limit the resizing? I placed code in the OnSize, but it did not work.

        E Offline
        E Offline
        Edwin Brunner
        wrote on last edited by
        #3

        BEGIN_MESSAGE_MAP(CMyDlg, CDialog) //{{AFX_MSG_MAP(CMyDlg) ... ON_WM_SIZING() //}}AFX_MSG_MAP END_MESSAGE_MAP() void CMyDlg::OnSizing(UINT fwSide, LPRECT pRect) { if (pRect->right - pRect->left > 400) pRect->right = pRect->left + 400; CDialog::OnSizing(fwSide, pRect); // TODO: }

        1 Reply Last reply
        0
        • S sweep123

          How can you handle the case where you want to put a Max limit on the size that you can make a MFC dialog based application window. I store the main dialog windows size in the InitDialog routine, but how do you limit the resizing? I placed code in the OnSize, but it did not work.

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          See the FAQ 4.18 How do I restrict my window so it can't be resized larger or smaller than a certain size?[^] --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber | RightClick-Encrypt You cannot stop me with paramecium alone!

          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