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. disable resize

disable resize

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

    how can I prevent the user the adjust/resize the window with mouse? thamks in advanced guy

    R M G 3 Replies Last reply
    0
    • G Guy

      how can I prevent the user the adjust/resize the window with mouse? thamks in advanced guy

      R Offline
      R Offline
      Remus Lazar
      wrote on last edited by
      #2

      Try to read help for function SetWindowPos you have a flag named SWP_NOSIZE /REMUS

      G 1 Reply Last reply
      0
      • G Guy

        how can I prevent the user the adjust/resize the window with mouse? thamks in advanced guy

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

        Handle the WM_GETMINMAXINFO message. This message passes you a struct, and you can just fill in the min size and max size with the same values, so the window will remain the same size. The mouse will still change to the resizing-arrow cursor when you move it over the window border, so to fix that, handle WM_NCHITTEST and if the cursor is over the resizing border, return HTNOWHERE from the message.

        1 Reply Last reply
        0
        • R Remus Lazar

          Try to read help for function SetWindowPos you have a flag named SWP_NOSIZE /REMUS

          G Offline
          G Offline
          Guy
          wrote on last edited by
          #4

          thanks remus for your help i've tried it before and it didn't work,so i will try again thanks anyway

          1 Reply Last reply
          0
          • G Guy

            how can I prevent the user the adjust/resize the window with mouse? thamks in advanced guy

            G Offline
            G Offline
            Guy
            wrote on last edited by
            #5

            hey remus & mike i found a solution i've used the modifystyle function to remove flags ws_thickframe|ws_maximizebox and that did the job thanks again for your support,if you'll ever need anything you know my address Guy ,Israel.

            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