When you see the title, the brothers may be hot. "Are you a child, is it not 揍?" Specified MB_yesno on the last parameter of MessageBox. The brother is invited, please watch the title, I am talking about it. "Yes" and "no", not "Yes" and "No"
#include
HHOOK hHook; LRESULT __stdcall CBTHookProc (long nCode, WPARAM wParam, LPARAM lParam); int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR szCmdLine, int iCmdShow) {hHook = SetWindowsHookEx (WH_CBT, (HOOKPROC) CBTHookProc, hInst, NULL); IF (hHOOK) {MessageBox (NULL, "Are you handsome?", "sc ", MB_ICONITION | MB_YESNO);} else {MessageBox (NULL, "Unable to install HOOK", "SC ", MB_ICONITION | MB_YESNO);} / / if returnit 1;}
LRESULT __stdcall CBTHookProc (long nCode, WPARAM wParam, LPARAM lParam) {if (nCode == HCBT_ACTIVATE) {SetDlgItemText ((HWND) wParam, IDYES, "& Yes"); SetDlgItemText ((HWND) wParam, IDNO, "& No"); Unhookwindowshookex (hHOOK);} Return 0;