Click here to Skip to main content
15,513,392 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have rebuilt one of my older C++ applications in Visual Studio 2019 and the toolbar looks like it used to i.e. it has 'proper' buttons. However, when I build a new application with VS2019 the toolbar buttons are 'flat' and its not obvious that they are buttons at all. Is there a way to re-create the old toolbar style where buttons were buttons and there was no mistaking them? Why are they OK in my older application? Is there a setting somewhere?

I know that some people will reply saying that flat is the future but my customer is not very receptive to that!

What I have tried:

I have tried comparing the preprocessor settings in the two projects. I have also messed abut with CMFCVisualManager but it doesn't appear to make any difference.
Updated 12-Feb-20 11:04am

1 solution

You need to use button properties and specify which version of the common control styles to use. See Toolbar Control and Button Styles (CommCtrl.h) - Win32 apps | Microsoft Docs[^].
Share this answer
softwaremonkey 12-Feb-20 17:56pm    
Richard, that link was interesting as it stated that toolbar styles TBSTYLE_FLAT and TBSTYLE_TRANSPARENT are ignored when using Common Controls version 6.00 which explains why when I changed these styles it had no effect. I found that if I turned off visual styles for the toolbar using SetWindowTheme() and also set the TBSTYLE_TRANSPARENT style, I got the appearance I was looking for.

Thanks for your help!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900