home *** CD-ROM | disk | FTP | other *** search
- // small fragment showing how to display a message box
- // when an error occurs and do something in response
-
- // string table entry in resource file :
- IDS_SOCKET_ERR_OPEN "Unable to Establish Connection, Retry or Cancel?"
-
- // implementation code :
- CString prompt;
- prompt.LoadString(IDS_SOCKET_ERR_OPEN);
- UINT response = AfxMessageBox(prompt, MB_RETRYCANCEL | MB_ICONQUESTION);
- switch( response )
- {
- case IDRETRY :
- // try this again
- break;
-
- case IDCANCEL :
- // abandon this action
- break;
-
- default:
- // should never reach here, but just in case....
- break;
- } // end switch
-