Why this code not creating button on my main window?

Jan 14, 2016 at 4:28am
Why this code is not creating button in my main window:
Here is the small snippet of my code.It does not create button on my main window.

I am using visual studio 2015

javascript:tx('code')#define IDC_MAIN_BUTTON2

case WM_CREATE:
HWND hButton = CreateWindowEx(L"button", L"Label",
WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON,
100, 200,
50, 20,
hWnd, (HMENU)IDC_MAIN_BUTTON2,
hInst, NULL);
break;javascript:tx('code')


Jan 14, 2016 at 8:26am
change the CreateWindowEx to CreateWindow. Hope that'll help.
Jan 14, 2016 at 11:16am
Alternatively you could provide a dwExStyle parameter to CreateWindowEx.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms632680%28v=vs.85%29.aspx
Jan 14, 2016 at 8:20pm
Thank you everyone for helping me
Topic archived. No new replies allowed.