int MessageBox(
HWND hWnd, // handle of owner window
LPCTSTR lpText, // address of text in message box
LPCTSTR lpCaption, // address of title of message box
UINT uType // style of message box
);
设置uType:=MB_YESNO|MB_DEFBUTTON2就可以了。
默认按钮可以设置以下四个值:
MB_DEFBUTTON1
MB_DEFBUTTON2
MB_DEFBUTTON3
MB_DEFBUTTON4
分别表示第一个按钮为默认按钮, 第二个按钮为默认按钮......