| 519 | } |
| 520 | |
| 521 | void CHogEditView::OnFileSaveAs() { |
| 522 | |
| 523 | // TODO: Add your command handler code here |
| 524 | CHogEditDoc *doc = GetDocument(); |
| 525 | CListCtrl &list = GetListCtrl(); |
| 526 | |
| 527 | // If the current document is a hog file, then call the hog |
| 528 | // creation routine to save it |
| 529 | if (doc->m_StaticHog) { |
| 530 | OnActionCreate(); |
| 531 | return; |
| 532 | } |
| 533 | |
| 534 | CString filter = "Outrage hog template (*.rib)|*.rib||"; |
| 535 | CFileDialog dlg_save(FALSE, ".rib", NULL, 0, (LPCTSTR)filter, this); |
| 536 | |
| 537 | if (dlg_save.DoModal() == IDCANCEL) { |
| 538 | return; |
| 539 | } |
| 540 | |
| 541 | // Display Wait Cursor |
| 542 | CWaitCursor wc; |
| 543 | |
| 544 | // save out rib |
| 545 | if (!doc->SaveDocument(dlg_save.GetPathName())) { |
| 546 | MessageBox("The file was not written successfully.", "File Write Error"); |
| 547 | return; |
| 548 | } |
| 549 | |
| 550 | // name dialog |
| 551 | doc->m_DocumentName = dlg_save.GetPathName(); |
| 552 | |
| 553 | // Put new doc name on title bar |
| 554 | doc->m_NoNameChosen = FALSE; |
| 555 | DocModified = FALSE; |
| 556 | UpdateTitle(doc->m_DocumentName, DocModified); |
| 557 | |
| 558 | UpdateTotalFiles(list.GetItemCount()); |
| 559 | } |
| 560 | |
| 561 | void CHogEditView::OnActionDelete() { |
| 562 | // TODO: Add your command handler code here |
nothing calls this directly
no test coverage detected