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. Dialog menu with Windows XP display glitch?

Dialog menu with Windows XP display glitch?

Scheduled Pinned Locked Moved C / C++ / MFC
c++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.
  • K Offline
    K Offline
    Kayembi
    wrote on last edited by
    #1

    Hi, I have written a small dialog application that works fairly well, but I have noticed that under Windows XP the menu doesn't display correctly. It's only a minor thing, but behind the text on the menu, it is white, even though it should be grey (or whatever colour the theme has set). I have seen this in some other programs too (though not many), and have also seen it asked here before though with no reply/solution It's only a very minor thing as it is purely aesthetic and does not affect the functioning of my program, but it would be great if I could get rid of it as it looks a little unprofessional. Does anybody know how I can make the menu appear correctly on XP? My program is just a dialog based Win32 app with no MFC... Many thanks for any suggestions. Cheers, KB

    H B 2 Replies Last reply
    0
    • K Kayembi

      Hi, I have written a small dialog application that works fairly well, but I have noticed that under Windows XP the menu doesn't display correctly. It's only a minor thing, but behind the text on the menu, it is white, even though it should be grey (or whatever colour the theme has set). I have seen this in some other programs too (though not many), and have also seen it asked here before though with no reply/solution It's only a very minor thing as it is purely aesthetic and does not affect the functioning of my program, but it would be great if I could get rid of it as it looks a little unprofessional. Does anybody know how I can make the menu appear correctly on XP? My program is just a dialog based Win32 app with no MFC... Many thanks for any suggestions. Cheers, KB

      H Offline
      H Offline
      HPSI
      wrote on last edited by
      #2

      What you see is a well-known bug in XP. There are three things required to trigger the behavior you describe: 1) a dialog-based app; 2) XP and 3) themes enabled. There is a CMenu replacement here on CP that corrects this bug: Owner Drawn Menu with Icons, Titles and Shading. Try the dialog sample, and you will see that it works correctly. HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.

      1 Reply Last reply
      0
      • K Kayembi

        Hi, I have written a small dialog application that works fairly well, but I have noticed that under Windows XP the menu doesn't display correctly. It's only a minor thing, but behind the text on the menu, it is white, even though it should be grey (or whatever colour the theme has set). I have seen this in some other programs too (though not many), and have also seen it asked here before though with no reply/solution It's only a very minor thing as it is purely aesthetic and does not affect the functioning of my program, but it would be great if I could get rid of it as it looks a little unprofessional. Does anybody know how I can make the menu appear correctly on XP? My program is just a dialog based Win32 app with no MFC... Many thanks for any suggestions. Cheers, KB

        B Offline
        B Offline
        Babayan Hovhannes
        wrote on last edited by
        #3

        You can try to write "*.manifest" file for your program. With this file your program will appear in 2000-look in Win2000 and with XP-look in WinXP. Your controls also will change their appearance and look. You can see "Using Windows XP Visual Styles" topic in MSDN. 1) Add a file called YourApp.exe.manifest to your source tree that has the following XML format: Your application description here. 2) Add the manifest to your application's resource file as follows: CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.exe.manifest" yiy

        H 1 Reply Last reply
        0
        • B Babayan Hovhannes

          You can try to write "*.manifest" file for your program. With this file your program will appear in 2000-look in Win2000 and with XP-look in WinXP. Your controls also will change their appearance and look. You can see "Using Windows XP Visual Styles" topic in MSDN. 1) Add a file called YourApp.exe.manifest to your source tree that has the following XML format: Your application description here. 2) Add the manifest to your application's resource file as follows: CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.exe.manifest" yiy

          H Offline
          H Offline
          HPSI
          wrote on last edited by
          #4

          Using a .manifest file will not fix the XP menu bug. HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.

          K 1 Reply Last reply
          0
          • H HPSI

            Using a .manifest file will not fix the XP menu bug. HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.

            K Offline
            K Offline
            Kayembi
            wrote on last edited by
            #5

            Thanks for the replies, much appreciated. Does this mean that if I created an owner-drawn menu instead of creating one in the dialog editor, it would show correctly? (That is, if it is okay to mix an owner-drawn menu with a dialog-based app...) Many thanks, KB

            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