Why this code not creating button on my main window?

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')


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