| 213 | // CHogEditView message handlers |
| 214 | |
| 215 | void CHogEditView::OnFileNew() { |
| 216 | // TODO: Add your command handler code here |
| 217 | CHogEditDoc *doc = GetDocument(); |
| 218 | CListCtrl &list = GetListCtrl(); |
| 219 | |
| 220 | // Set full row selection |
| 221 | SetFullRowSel(m_bFullRowSel); |
| 222 | |
| 223 | // If current file has been modified, check with user first... |
| 224 | if (ModifiedPrompt(this) == IDNO) |
| 225 | return; |
| 226 | |
| 227 | // Display Wait Cursor |
| 228 | CWaitCursor wc; |
| 229 | |
| 230 | // Clear out the document's information |
| 231 | doc->OnNewDocument(); |
| 232 | |
| 233 | // Wipeout the CtrlList items |
| 234 | list.DeleteAllItems(); |
| 235 | |
| 236 | // Put new doc name on title bar |
| 237 | UpdateTitle(doc->m_DocumentName, DocModified); |
| 238 | UpdateTotalFiles(list.GetItemCount()); |
| 239 | } |
| 240 | |
| 241 | // Returns a type string for the given filename extension |
| 242 | void CHogEditView::GetFileType(char *type, char *filename) { |
nothing calls this directly
no test coverage detected