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