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. Resolution for Dialog

Resolution for Dialog

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

    Hi, I make one dialog with pos as follow SetWindowPos(&CWnd::wndBottom,0,80,350,900,SWP_SHOWWINDOW); But when i changed the resolution to 800x600,half of dialog get hided. How can i avoid that? I want in all resolution the dialog should display in same size.

    Anu

    K M B S 4 Replies Last reply
    0
    • A Anu_Bala

      Hi, I make one dialog with pos as follow SetWindowPos(&CWnd::wndBottom,0,80,350,900,SWP_SHOWWINDOW); But when i changed the resolution to 800x600,half of dialog get hided. How can i avoid that? I want in all resolution the dialog should display in same size.

      Anu

      K Offline
      K Offline
      KingsGambit
      wrote on last edited by
      #2

      You can handle WM_DISPLAYCHANGE message in your application and call SetWindowPos(...) to readjust the size.

      1 Reply Last reply
      0
      • A Anu_Bala

        Hi, I make one dialog with pos as follow SetWindowPos(&CWnd::wndBottom,0,80,350,900,SWP_SHOWWINDOW); But when i changed the resolution to 800x600,half of dialog get hided. How can i avoid that? I want in all resolution the dialog should display in same size.

        Anu

        M Offline
        M Offline
        Moak
        wrote on last edited by
        #3

        Anu_Bala wrote:

        SetWindowPos(&CWnd::wndBottom,0,80,350,900,SWP_SHOWWINDOW); But when i changed the resolution to 800x600,half of dialog get hided [...] I want in all resolution the dialog should display in same size.

        Well, you can't have a 900 pixel high window in a 600 pixel high desktop. :confused: Cheers, M

        Webchat in Europe :java: (only 4K)

        1 Reply Last reply
        0
        • A Anu_Bala

          Hi, I make one dialog with pos as follow SetWindowPos(&CWnd::wndBottom,0,80,350,900,SWP_SHOWWINDOW); But when i changed the resolution to 800x600,half of dialog get hided. How can i avoid that? I want in all resolution the dialog should display in same size.

          Anu

          B Offline
          B Offline
          beko
          wrote on last edited by
          #4

          You can adjust your sizes with respect to maximum width and height available. for example your ratio for 900(in 1028x1024) is 900/1024 and for 800x600, it will be 600*900/1024. Perhaps this[^] could also help.

          1 Reply Last reply
          0
          • A Anu_Bala

            Hi, I make one dialog with pos as follow SetWindowPos(&CWnd::wndBottom,0,80,350,900,SWP_SHOWWINDOW); But when i changed the resolution to 800x600,half of dialog get hided. How can i avoid that? I want in all resolution the dialog should display in same size.

            Anu

            S Offline
            S Offline
            SimonSays
            wrote on last edited by
            #5

            By way of pointing out the obvious -- if you have an 820 pixel high dialog on a 600 pixel high display, part of it will be cut off no matter what.

            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