Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does my Button look like it's from 1990?

I'm writing a Windows GUI app and I have come on the need to have a normal button.

I am using this code to generate the button:

hwnd = CreateWindowEx(
    NULL,
    "BUTTON",
    "Button",
    WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON,
    CW_USEDEFAULT, CW_USEDEFAULT,
    60, 25,
    parentHwnd, NULL,
    GetModuleHandle(NULL), NULL);

I want the button to look like this (Ignore the background colour):

Good button

But it ends up looking like this:
Bad button
I think I'm missing a style or something. What can I do to make it look like the first button?

like image 274
John Zane Avatar asked Oct 14 '22 19:10

John Zane


1 Answers

See Normal looking button with c++ / win32

like image 138
zsalzbank Avatar answered Oct 18 '22 01:10

zsalzbank