10

See steps below to reproduce. Works well in XE2 but not XE8.

  1. Create a new VCL Forms Application - Delphi
  2. Place a TButton and a TOpenDialog on the form
  3. In the button OnClick event call OpenDialog1.Execute
  4. Run the program, open the file dialog, and right-click on a text file => shows menu items ok
  5. Go to Project/Options/Application/Appearance. Enable and choose a custom style (such as "Ruby Graphite") and recompile
  6. Run the program, open the file dialog, and right-click a text file => does not show menu items correctly (invalid characters are shown)

Tested with XE8 Subscription Update 1 (and Windows upgraded from 8.1 to 10)

6
  • Which local Windows version is that? Aug 25, 2015 at 14:33
  • @Rudy, Windows 10 Pro
    – Thomas
    Aug 26, 2015 at 8:11
  • I meant, which national version, i.e. Danish, German, US, Russian, Chinese, Dutch, French, Greek, etc. etc. Aug 26, 2015 at 8:17
  • But that seems to be obsolete anyway. Aug 26, 2015 at 8:38
  • Windows 10 pro, Swedish.
    – Thomas
    Aug 26, 2015 at 10:30

1 Answer 1

17

Windows 10 introduces some internal changes in the code responsible to draw the shell popup-menus. So the VCL Style code must be modified to be compatible with Windows 10. I just reported this to EMB

As workaround you can use the VCL Styles Utils project which fixes this issue (only you need add the Vcl.Styles.Utils.Menus unit to your project).

Check the next Image , The left popup-menu uses the standard VCL Styles,and the right menu uses the VCL Styles Utils project.

enter image description here

3
  • 1
    This is one of the perils and risks of adopting VCL styles. Embarcadero should do a much better job of communicating this risk. Aug 25, 2015 at 18:13
  • Is this related to the reverse engineering of DirectUI? Aug 25, 2015 at 21:44
  • @DavidHeffernan, No, the menus are drawn using a "traditional" hook (SetWindowsHookEx) over the #32768 class.
    – RRUZ
    Aug 25, 2015 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.