here is a partial sample, u'll have to finish it off, with the print text bit, cos I can't be bothered, here is the code for the rest though
Code:
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HINSTANCE g_hinst;
switch (message) /* handle the messages */
{
case WM_CREATE:
CreateWindowEx(1,
TEXT("BUTTON"),
TEXT("A Simple Button"),
WS_CHILD|WS_VISIBLE|BS_DEFPUSHBUTTON,
7,
5,
480,
40,
hwnd,
(HMENU)1,
g_hinst,
NULL
);
break;
case WM_COMMAND:
if(LOWORD(wParam) == 1){
if(HIWORD(wParam) == BN_CLICKED){
// Put in message output thing here //
}
}
break;
// finish off the message switch //