MFC Library Reference |
//CDocument 객체 자체를 없에지 않고, document에 있는 내용을 지운다.
virtual void DeleteContents( );
Remarks
It is called just before the document is to be destroyed. It is also called to ensure that a document is empty before it is reused. This is particularly important for an SDI application, which uses only one document; the document is reused whenever the user creates or opens another document. Call this function to implement an "Edit Clear All" or similar command that deletes all of the document's data. The default implementation of this function does nothing. Override this function to delete the data in your document.//이 함수는 기본적으로 아무것도 하지않는다. 하지만 사용자의 document의 데이터를 지우기 위해서 재정의한다.
Example
CDocument Overview | Class Members | Hierarchy Chart | CDocument::OnCloseDocument | CDocument::OnNewDocument | CDocument::OnOpenDocument// This example is the handler for an Edit Clear All command. void CMyDoc::OnEditClearAll() { DeleteContents(); UpdateAllViews(NULL); } void CMyDoc::DeleteContents() { // Re-initialize document data here. }See Also
댓글
댓글 쓰기