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. Ui Problem in Vista and above

Ui Problem in Vista and above

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpdesignquestion
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.
  • R Offline
    R Offline
    rahul kulshreshtha
    wrote on last edited by
    #1

    Vista and above windows OS have an option to change display [see below image] http://www.freeimagehosting.net/uploads/6704c49814.png[^] If user select any thing else other than 100% then my application ui gets disturb. Background image does not cover the whole dialog and labels do not contain whole text. Is there any way to fix that? This is how my screen looks like http://www.freeimagehosting.net/uploads/5e21dbde72.png[^] It's background is white but it is not getting stretch to cover the whole uncovered space when I change the display. In normal case (100% is set) it look fine. Any help ??

    H C 2 Replies Last reply
    0
    • R rahul kulshreshtha

      Vista and above windows OS have an option to change display [see below image] http://www.freeimagehosting.net/uploads/6704c49814.png[^] If user select any thing else other than 100% then my application ui gets disturb. Background image does not cover the whole dialog and labels do not contain whole text. Is there any way to fix that? This is how my screen looks like http://www.freeimagehosting.net/uploads/5e21dbde72.png[^] It's background is white but it is not getting stretch to cover the whole uncovered space when I change the display. In normal case (100% is set) it look fine. Any help ??

      H Offline
      H Offline
      Hans Dietrich
      wrote on last edited by
      #2

      Actually this predates Vista; on the NT side, even Win 2000 let you change the font size (small fonts, large fonts). What you need to do is first handle the WM_DISPLAYCHANGE message, which tells you that some display setting has changed. Then, you need to resize and reposition the controls and background image to fit properly with the new settings. See (as an example) CResizableDialog[^].

      Best wishes, Hans


      [Hans Dietrich Software]

      R 1 Reply Last reply
      0
      • R rahul kulshreshtha

        Vista and above windows OS have an option to change display [see below image] http://www.freeimagehosting.net/uploads/6704c49814.png[^] If user select any thing else other than 100% then my application ui gets disturb. Background image does not cover the whole dialog and labels do not contain whole text. Is there any way to fix that? This is how my screen looks like http://www.freeimagehosting.net/uploads/5e21dbde72.png[^] It's background is white but it is not getting stretch to cover the whole uncovered space when I change the display. In normal case (100% is set) it look fine. Any help ??

        C Offline
        C Offline
        Charles Oppermann
        wrote on last edited by
        #3

        This link might be helpful: MFC applications now default to being DPI-aware[^]

        Charles Oppermann

        R 1 Reply Last reply
        0
        • H Hans Dietrich

          Actually this predates Vista; on the NT side, even Win 2000 let you change the font size (small fonts, large fonts). What you need to do is first handle the WM_DISPLAYCHANGE message, which tells you that some display setting has changed. Then, you need to resize and reposition the controls and background image to fit properly with the new settings. See (as an example) CResizableDialog[^].

          Best wishes, Hans


          [Hans Dietrich Software]

          R Offline
          R Offline
          rahul kulshreshtha
          wrote on last edited by
          #4

          Thanks Hans, I will try it soon.

          1 Reply Last reply
          0
          • C Charles Oppermann

            This link might be helpful: MFC applications now default to being DPI-aware[^]

            Charles Oppermann

            R Offline
            R Offline
            rahul kulshreshtha
            wrote on last edited by
            #5

            Thanks Charles, I just checked out "Enable DPI Awareness" property does not come in VS2008. I will checkout in VS2010 tomorrow. Thanks for the reply, -Rahul

            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