Ok, I want to put the BN_CLICKED in an 'if' statement(to check if it was clicked). When I run it though, I get a popup that is supposed to popup only when the button is clicked. Help with the below code please!:
case WM_CREATE:
case WM_COMMAND:
HWND btn;
btn = CreateWindow(
"button",
"Click me",
WS_CHILD | WS_BORDER | WS_VISIBLE,
10,
10,
50,
50,
hwnd,
(HMENU) 1,
g_hInst,
NULL
);
if((hwnd, (WPARAM)WM_COMMAND, (LPARAM)BN_CLICKED, btn) != 0)
{
MessageBox(hwnd, "Hello", "Greetings", MB_OK + MB_SYSTEMMODAL);
}
break;
break;