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. Resizing the dialog box controls

Resizing the dialog box controls

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
6 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
    SnaKeBeD
    wrote on last edited by
    #1

    hi all, i'm developing an application using MFC dialog. I have to position the buttons and other controls depening on the Size of the screen.can anybody tell me how to do that, if possibel with sample code. My dialog properties is set to MAXIMIZED:(

    ||SnAkeBed||

    H D 2 Replies Last reply
    0
    • S SnaKeBeD

      hi all, i'm developing an application using MFC dialog. I have to position the buttons and other controls depening on the Size of the screen.can anybody tell me how to do that, if possibel with sample code. My dialog properties is set to MAXIMIZED:(

      ||SnAkeBed||

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Do you want to use of WM_SIZE?

      S 1 Reply Last reply
      0
      • H Hamid Taebi

        Do you want to use of WM_SIZE?

        S Offline
        S Offline
        SnaKeBeD
        wrote on last edited by
        #3

        ya .. could you tell me how to use that properly

        ||SnAkeBed||

        P H 2 Replies Last reply
        0
        • S SnaKeBeD

          ya .. could you tell me how to use that properly

          ||SnAkeBed||

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

          You should have a message handler for WM_SIZE message in your CDialog class. While resizing, the handler will be called with the dialog's width and height value. Deciside where to place your controls with respect to the size. To position the controls you can use

          SetWindowPos(...)
          or
          MoveWindow(...)


          Do your Duty and Don't expect the Result

          1 Reply Last reply
          0
          • S SnaKeBeD

            hi all, i'm developing an application using MFC dialog. I have to position the buttons and other controls depening on the Size of the screen.can anybody tell me how to do that, if possibel with sample code. My dialog properties is set to MAXIMIZED:(

            ||SnAkeBed||

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            SnaKeBeD wrote:

            can anybody tell me how to do that, if possibel with sample code.

            See if the Extras section of this article is of any help.


            "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            1 Reply Last reply
            0
            • S SnaKeBeD

              ya .. could you tell me how to use that properly

              ||SnAkeBed||

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              See Windows Message Handling - Part 1[^].

              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