the child control is created with BS_NOTIFY for i get it's own messages.
but i belive that i have something wrong with my form control, on window procedure:
1 2 3 4 5
case WM_COMMAND:
{
return DefWindowProc(HandleWindow, WM_COMMAND, wParam, lParam);
}
break;
why these code don't activate the buton\child controls message?
What type of message from a button are you trying to receive? All button controls send BN_CLICKED messages to their parent in WM_COMMAND transport. I believe the BN_CLICKED message will be in the HIWORD(wParam), and you would need to specifically test for that if you wanted to filter it out. However, most folks do a switch in the WM_COMMAND just on the LOWORD(wParam) which is the control id (HMENU parameter) from the CreateWindow() call that creates the button. The code you have shown will do nothing.
BS_NOTIFY is a style, bot a message. MSDN says this about it...
Enables a button to send BN_DBLCLK, BN_KILLFOCUS, and BN_SETFOCUS notification messages to its parent window. Note that buttons send the BN_CLICKED notification message regardless of whether it has this style.
If you need to know the HWND of the button, that will be the lParam of the WM_COMMAND message.