Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do the buttons in my window look old in C++?

I just began creating a new windows application in C++, using VS 2012, and instead of using the pre-made template for "win32 application", I simply started a blank project and wrote my window from scratch.

The problem is, the buttons look like this:

Then I realized I needed to embed a manifest, which was no issue, so I put this inside the code:

pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")

Afterward, to my displeasure, the button became this equally unattractive little guy:

For some reason, it's not looking how it is supposed to. Does anybody have any ideas what the issue might be?

like image 967
Shane Avatar asked Jul 15 '13 06:07

Shane


2 Answers

Postmessage and WS_BORDER

Issue might be that you use WinAPI directly.
Have you tried sending WS_BORDER with PostMessage to the Control and set it 0 ?

like image 191
Alker Avatar answered Sep 24 '22 00:09

Alker


Link your manfifest to your application which specifies v6 common controls. http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175(v=vs.85).aspx

like image 34
Hidden Avatar answered Sep 26 '22 00:09

Hidden