IdanM
asked on
Create a Button using CreateWindow
Hi,
I am trying to create a button on a window using the CreateWindow function and the class "Button". However, the button being created is different in looks than buttons I create using Dialog Boxes resources. It has a different font and perhaps other different details that I can't make for sure. Am I missing some style flag? I found no help on that issue in the SDK Documentation. I wish to make the button I create on the window to look like my dialog boxes buttons.
Here is the CreateWindow code:
m_hPlayButton = CreateWindow("Button", "&Play", WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, 5, 5, 100, 100, m_hPlayWindow, NULL, (HINSTANCE)GetWindowLong(m _hPlayWind ow, GWL_HINSTANCE), NULL);
Thanks,
Idan.
I am trying to create a button on a window using the CreateWindow function and the class "Button". However, the button being created is different in looks than buttons I create using Dialog Boxes resources. It has a different font and perhaps other different details that I can't make for sure. Am I missing some style flag? I found no help on that issue in the SDK Documentation. I wish to make the button I create on the window to look like my dialog boxes buttons.
Here is the CreateWindow code:
m_hPlayButton = CreateWindow("Button", "&Play", WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, 5, 5, 100, 100, m_hPlayWindow, NULL, (HINSTANCE)GetWindowLong(m
Thanks,
Idan.
ASKER
I just used the resource editor to edit a Dialog Boxes. Some of your buttons in your site look the same as mine, with a different font.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
the buttons on my site look the same as the ones you're having a problem with? thats the way buttons look, unless you specify to make them checkbox style. what is the difference that used to be in the dialog buttons, they should be the same
ASKER
Thanks, that did the trick :)
you can look at the source on my site www.PlanetCpp.com.
most source has a button on it for you to look at and one has the ability to change fonts.