Create a Button using CreateWindow
Posted on 2003-03-22
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_hPlayWindow, GWL_HINSTANCE), NULL);