You have to make a whole new proc message for those. Like the WndProc one you defined for the window you have to make a similar one for the button and it will send the button press message(s) to that proc.
EDIT: Or you could define something like IDN_PUSHBTN. This is if you are making a separate button in your window not in a dialog box. Then you call the CreateWindow function for the button. Here is an example of what a button's CreateWindow function looks like:
Code:
hwnd2=CreateWindowEx(WS_EX_CLIENTEDGE,"BUTTON","Click me!",WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,x/2,y/2,75,25,hwnd,
ID_PUSHBTN,hInstance,NULL);
. The x and y variables are just my window's size so the button will be in the middle. To get the messages for the button, like if it is clicked, then call this in your window's message function. Example:
Code:
case WM_COMMAND:
switch(LOWORD(wParam))
{
case ID_PUSHBTN:
MessageBox (NULL, "You clicked?" , "Clicked!", MB_ICONQUESTION);
break;
}
return 0;
Hope that helps!