there's no problem with your code, it works fine; in the 'WM_CREATE', you create the button, then switching the 'WM_COMMAND' you search in the 'WPARAM wParam' parameter of the window function (procedure) for a 'HIWORD((WPARAM)wParam)' such as 'BN_CLICKED', if you find it then launch the message. maybe you have an error while the creation of the window, or in the declaration of the main procedure
niara