Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Yes to all" message box

Status
Not open for further replies.

dcswee

Programmer
Jan 23, 2002
13
GB
Is there a way of using the "Yes", "No", "Yes to all" dialog that occurs so much in windows? AfxMessageBox does not have any options for this style of dialog.
 
If you're using MFC, use:

BOOL bWimp = MessageBox(hWnd, "Are you really a quitter?",
"My Application", MB_YESNO | MB_ICONWARNING);

// check for IDYES or IDNO

:cool:
 
There's no 'built-in' type that supports, "Yes to All" or "No to All". You have to make your own dialog, which isn't too difficult. The hardest part may be resizing the dialog based on the length of the text.
 
Thanks, that saved me time looking a built in type!

Now that I have a custom dialog box, I have tried to get it to behave in the same way as AfxMessageBox, eg, pass it a string to display, etc.

This is where the hard part comes in, resizing the dialog based on the length of the text. Any ideas??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top