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. How to stop resizng a window ,when it size excede the certain length

How to stop resizng a window ,when it size excede the certain length

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 3 Posters 17 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.
  • D Offline
    D Offline
    doe
    wrote on last edited by
    #1

    a window is resizable, but when the length of window excede 300 pixels (for example), it can NOT make larger and stop resizing. How ? Thanks in advanced

    U M 2 Replies Last reply
    0
    • D doe

      a window is resizable, but when the length of window excede 300 pixels (for example), it can NOT make larger and stop resizing. How ? Thanks in advanced

      U Offline
      U Offline
      User 1052
      wrote on last edited by
      #2

      You could catch the WM_SIZE message and check to see if the width is greater than you want it to be and then reset it to 300. ================== The original message was: a window is resizable, but when the length of window excede 300 pixels (for example), it can NOT make larger and stop resizing. How ? Thanks in advanced

      1 Reply Last reply
      0
      • D doe

        a window is resizable, but when the length of window excede 300 pixels (for example), it can NOT make larger and stop resizing. How ? Thanks in advanced

        M Offline
        M Offline
        Mike Dunn
        wrote on last edited by
        #3

        Read up on WM_GETMINMAXINFO. Windows sends this to you as the user is resizing the window. You fill in a MINMAXINFO struct with the min/max sizes, and Windows will not let the window be sized outside of those bounds. --Mike-- ================== The original message was: a window is resizable, but when the length of window excede 300 pixels (for example), it can NOT make larger and stop resizing. How ? Thanks in advanced

        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