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. ATL / WTL / STL
  4. Creating a resizable dialog in MFC

Creating a resizable dialog in MFC

Scheduled Pinned Locked Moved ATL / WTL / STL
questionc++tutorial
4 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.
  • T Offline
    T Offline
    Twonington
    wrote on last edited by
    #1

    Hi, I'm sure this is probably the easiest question in the world but I can seem to find anything anywhere about how to do it. Basically I have created a dialog in an MFC program, but it is a fixed size, I want the user to be able to resize it, how do I do this? Cheers

    R P 2 Replies Last reply
    0
    • T Twonington

      Hi, I'm sure this is probably the easiest question in the world but I can seem to find anything anywhere about how to do it. Basically I have created a dialog in an MFC program, but it is a fixed size, I want the user to be able to resize it, how do I do this? Cheers

      R Offline
      R Offline
      Rory Solley
      wrote on last edited by
      #2

      In the resource editor, open the properties for your dialog and select the Border style to be "Resizing". You will then need to handle the WM_SIZE message in your dialog's code (use ClassWizard) so that you can handle the resizing/repositioning of any child controls when the dialog is resized. This is a pretty common problem when using dialogs under MFC and there are a boatload of solutions, many of them on here. I recommend searching for Paolo Messina's dialog resizing solution which works nicely. Hope that helps...

      T 1 Reply Last reply
      0
      • R Rory Solley

        In the resource editor, open the properties for your dialog and select the Border style to be "Resizing". You will then need to handle the WM_SIZE message in your dialog's code (use ClassWizard) so that you can handle the resizing/repositioning of any child controls when the dialog is resized. This is a pretty common problem when using dialogs under MFC and there are a boatload of solutions, many of them on here. I recommend searching for Paolo Messina's dialog resizing solution which works nicely. Hope that helps...

        T Offline
        T Offline
        Twonington
        wrote on last edited by
        #3

        Thanks alot for that, knew it had to be something faily simple, that sorted it staight away. Cheers for help, much appreciated! :-D

        1 Reply Last reply
        0
        • T Twonington

          Hi, I'm sure this is probably the easiest question in the world but I can seem to find anything anywhere about how to do it. Basically I have created a dialog in an MFC program, but it is a fixed size, I want the user to be able to resize it, how do I do this? Cheers

          P Offline
          P Offline
          pablo_mag
          wrote on last edited by
          #4

          This might prove useful: http://www.codeproject.com/dialog/dlgresizearticle.asp It'll save you the trouble of manually repositioning controls in response to WM_SIZE messages. HTH

          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