i need help to popup a message box when somebody clicks the ok cancel or the little x in the corner i dont know how to work with those buttons
Printable View
i need help to popup a message box when somebody clicks the ok cancel or the little x in the corner i dont know how to work with those buttons
int MessageBox( HWND hWnd,
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType
);
http://msdn.microsoft.com/library/de...messagebox.asp
to make it popup when you hit a button: do this in your winproc:
to make it popup when the user closes:Code:switch(msg)
{
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_BUTTON:
MessageBox(hwnd,"hey!!!","you",MB_OK);
break;
}
break;
}
-edit-Code:switch(msg)
{
case WM_CLOSE:
case WM_DESTROY:
MessageBox(hwnd,"hey!!!","you",MB_OK);
break;
}
and this belongs more in the win32 forum....