Shane
Shane

Reputation: 121

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?

Upvotes: 10

Views: 1667

Answers (2)

Hidden
Hidden

Reputation: 3628

Link your manfifest to your application which specifies v6 common controls. https://learn.microsoft.com/en-us/windows/win32/controls/cookbook-overview

Upvotes: 2

Alker
Alker

Reputation: 61

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 ?

Upvotes: 5

Related Questions