c++winapibuttonstyles

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?


Solution

  • 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 ?