The Road to Delphi

Delphi – Free Pascal – Oxygene

VCL Styles Utils and Popup Menus – Major Update


As you probably know the VCL Styles doesn’t support  Popup menus, this means if you apply any VCL Style  to your VCL Application  the popup menus will remain with the Windows native look and feel  (exists some workarounds for this like use a TPopupActionBar  as described here, but this only works partially, and doesn’t support the child menus of a TMainMenu) Since Sometime ago the VCL Styles Utils project can help you to overcome this limitation adding support for VCL Styled Popup Menus.

Now we just uploaded a major update to the VCL Styles Utils project. This new version fix all the issues reported via mail and the issue page related the PopUp menus like support for  the Break property, Checkboxes,  Radio Items,  Default items and so on.

Sample images

TMainMenu with VCL Styles


TMainMenu with VCL Styles and VCL Styles Utils


Popup Menu with VCL Styles


Popup Menu with VCL Styles and VCL Styles Utils


Right to left Popup Menu with VCL Styles


Right to left Popup Menu with VCL Styles and VCL Styles Utils


System Menu with VCL Styles


System Menu with VCL Styles and VCL Styles Utils


To add support for VCL Styled Popup Menus in your Application only you must add these units to your project Vcl.Styles.Utils.Menus, Vcl.Styles.Utils.SysStyleHook and Vcl.Styles.Utils.SysControls.

You can download sample application from here and the source of the Application is here.

Author: Rodrigo

Just another Delphi guy.

26 thoughts on “VCL Styles Utils and Popup Menus – Major Update

  1. Windows 8 64 bit/ Downloaded sample app. Start. Select “Metro Black” style. Click “Color Dialog”. Crash. The other style worked

  2. Thank you for fixing one of my posted problems. I really appreciate it.

  3. Great work, almost perfect…but I’m asking always the same thing :-) .

    As QC is totally ignored by Embarcadero for VCL and IDE bugs (it seems that the only thing that matters is FireMonkey), is it possibile to patch in some simple way the VCL bug that make impossible to reflect the changes to Screen.MenuFont.Size to components like TMainMenu, TPopupMenu etc.?. To understand what I mean just append the next two lines of code in the FormCreate of yours test application and wathc the result:


    I need this, I’ve some applications with traditional TMainMenu running on monitors 1900×1200 and I need to show the menu a little bit bigger then classic 8 size and with the style that I want but I don’t want to oblige my customers to modify the Windows System Fonts. I want to be free to set TMainMenu font in Times New Roman 48! I tried also TMS components, the TActionMenuBar but everything is soffering the same bug. I opend a ticket in QC for XE3 but till now in XE5 they totally ignored this kind of bug.


    • Davide, sometime ago we discuss about this same topic but using the TPlatformVclStylesStyle hook. Unfortunately regarding to the TMainMenu and TPopupMenu the same applies, this must be fixed in the VCL code as well. sorry for that :(

      • Rodrigo, yes you are right but since you’re so good at solving these problems I have always hope that you somehow manage to hack in VCL to solve this specific problem! :-)

        Thanks, Davide

  4. Really a shame! EMBA ist not able to fix their own Style features. Deliver half-baked features and let the customer alone! I am pissed!

    • I agree with you. It is really a shame. It is absolutely not acceptable that this kind of problem should be resolved externally with hacks on the vcl. What are they waiting for? It is not acceptable that bugs are fixed only if they are voted in QC. A bug is a bug and should be fixed always. If I waste my time to open a ticket on QC preparing also demo to reproduce, it is because I need absolutely that fix and I aspect that this could be solved at least in the next release of the product. Why I’ve to pay a SA to get XE3, XE4, X5 which are pratically the same product speaking in terms of IDE and VCL develop environment? If you give me the possibility to do a thing, that thing should work; if not and you don’t want to fix it don’t give me the possibility of doing that thing!

      I apologize for the outburst!

    • +1
      Why has EMB not fixed this long ago?? Why do their customers have to create workarounds. I certainly hope this fix makes it into the next update before XE6.

  5. 1. Can you please provide an example.dpr with all needed files?
    2. A include file is missing. don’t remember the name.

  6. Pingback: VCL Styles Utils and Popup Menus – Major ...

  7. You get me wrong. okay. What files do I need for a complete skinning (innosetup is not needed)? It is not clear to me.

    • Peter, for add support for styled PopupMenus and common dialogs you must add all these units to your project Vcl.Styles.Utils.Menus, Vcl.Styles.Utils.Forms, Vcl.Styles.Utils.StdCtrls, Vcl.Styles.Utils.ComCtrls, Vcl.Styles.Utils.SysStyleHook, Vcl.Styles.Utils.ScreenTips, Vcl.Styles.Utils.SysControls.

  8. Pingback: Sip from the Firehose : FireMonkey and VCL Styles - articles, blogs, videos, docs and examples

  9. I’ve encountered a situation where right clicking on TMemo causes access violation. Reason is PopupWndList in Line 303 of Vcl.Styles.Syscontrols is NIL. Inserting check for NIL fixes the problem

  10. Alt + Space is not working. Graphics, Menus, SysControls, SysStyleHook, SystemMenu and UxTheme are added to my project. Did I miss something?

    Thanks in advance.

  11. I added the designated units to fix popup menus but menu item shortcuts are still not being displayed.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s