I needed to group controls in a static control. I used WS_EX_CONTROLPARENT for this and used CreateWindowEx function for each. Now I have a problem, my controls, buttons, only accepts enter key, pressing space or mouse clicking doesn't get WM_COMMAND messages. I have attached this example, it is a Dev-Cpp v4.7 project. But I think this is not related to compiler.
Happy new year