Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 1.14 KB

handling-commands-in-the-document.md

File metadata and controls

14 lines (11 loc) · 1.14 KB
description title ms.date helpviewer_keywords ms.assetid
Learn more about: Handling Commands in the Document
Handling Commands in the Document
11/04/2016
message maps [MFC], in document class
command handling [MFC]
documents [MFC], message maps
message handling [MFC], WM_COMMAND messages
command handling [MFC], commands in documents
documents [MFC], handling messages in
c7375584-27af-4275-b2fd-afea476785d0

Handling Commands in the Document

Your document class may also handle certain commands generated by menu items, toolbar buttons, or accelerator keys. By default, CDocument handles the Save and Save As commands on the File menu, using serialization. Other commands that affect the data may also be handled by member functions of your document. For example, in the Scribble program, class CScribDoc provides a handler for the Edit Clear All command, which deletes all of the data currently stored in the document. Documents can have message maps, but unlike views, documents cannot handle standard Windows messages — only WM_COMMAND messages, or "commands."

See also

Using Documents