description | title | ms.date | ms.assetid |
---|---|---|---|
Learn more about: DHTML Editing Command Maps |
DHTML Editing Command Maps |
11/04/2016 |
c1b49876-039e-4a26-bb24-ea98ccf254a1 |
The following macros can be used to map DHTML editing commands in CHtmlEditView-derived classes. For an example of their use, see HTMLEdit Sample.
Name | Description |
---|---|
DECLARE_DHTMLEDITING_CMDMAP | Declares a DHTML editing command map in a class. |
BEGIN_DHTMLEDITING_CMDMAP | Starts the definition of a DHTML editing command map within a class. |
END_DHTMLEDITING_CMDMAP | Marks the end of a DHTML editing command map. |
DHTMLEDITING_CMD_ENTRY | Maps a command ID to an HTML editing command. |
DHTMLEDITING_CMD_ENTRY_FUNC | Maps a command ID to an HTML editing command and message handler. |
DHTMLEDITING_CMD_ENTRY_TYPE | Maps a command ID to an HTML editing command and user interface element. |
DHTMLEDITING_CMD_ENTRY_FUNC_TYPE | Maps a command ID to an HTML editing command, message handler, and user interface element. |
Declares a DHTML editing command map in a class.
DECLARE_DHTMLEDITING_CMDMAP(className)
className
The name of the class.
This macro is to be used in the definition of CHtmlEditView-derived classes.
Use BEGIN_DHTMLEDITING_CMDMAP to implement the map.
See HTMLEdit Sample.
Header afxhtml.h
Starts the definition of a DHTML editing command map within a class.
BEGIN_DHTMLEDITING_CMDMAP(className)
className
The name of the class containing the DHTML editing command map. This class should derive directly or indirectly from CHtmlEditView and include the DECLARE_DHTMLEDITING_CMDMAP macro within its class definition.
Add a DHTML editing command map to your class to map user interface commands to HTML editing commands.
Place the BEGIN_DHTMLEDITING_CMDMAP macro in the class's implementation (.cpp) file followed by DHTMLEDITING_CMD_ENTRY macros for the commands the class is to map (for example, from ID_EDIT_CUT to IDM_CUT). Use the END_DHTMLEDITING_CMDMAP macro to mark the end of the event map.
Header afxhtml.h
Marks the end of a DHTML editing command map.
END_DHTMLEDITING_CMDMAP()
Use in conjunction with BEGIN_DHTMLEDITING_CMDMAP.
See HTMLEdit Sample.
Header afxhtml.h
Maps a command ID to an HTML editing command.
DHTMLEDITING_CMD_ENTRY(cmdID, dhtmlcmdID)
cmdID
The command ID (such as ID_EDIT_COPY).
dhtmlcmdID
The HTML editing command to which cmdID maps (such as IDM_COPY).
See HTMLEdit Sample.
Header afxhtml.h
Maps a command ID to an HTML editing command and message handler.
DHTMLEDITING_CMD_ENTRY_FUNC(cmdID, dhtmlcmdID, member_func_name)
cmdID
The command ID (such as ID_EDIT_COPY).
dhtmlcmdID
The HTML editing command to which cmdID maps (such as IDM_COPY).
member_func_name
The name of the message-handler function to which the command is mapped.
See HTMLEdit Sample.
Header afxhtml.h
Maps a command ID to an HTML editing command and user interface element.
DHTMLEDITING_CMD_ENTRY_TYPE(cmdID , dhtmlcmdID , elemType)
cmdID
The command ID (such as ID_EDIT_COPY).
dhtmlcmdID
The HTML editing command to which cmdID maps (such as IDM_COPY).
elemType
The user interface element type; one of AFX_UI_ELEMTYPE_NORMAL, AFX_UI_ELEMTYPE_CHECKBOX, or AFX_UI_ELEMTYPE_RADIO.
See HTMLEdit Sample.
Header afxhtml.h
Maps a command ID to an HTML editing command, message handler, and user interface element.
DHTMLEDITING_CMD_ENTRY_FUNC_TYPE(cmdID, dhtmlcmdID, member_func_name, elemType)
cmdID
The command ID (such as ID_EDIT_COPY).
dhtmlcmdID
The HTML editing command to which cmdID maps (such as IDM_COPY).
member_func_name
The name of the message-handler function to which the command is mapped.
elemType
The user interface element type; one of AFX_UI_ELEMTYPE_NORMAL, AFX_UI_ELEMTYPE_CHECKBOX, or AFX_UI_ELEMTYPE_RADIO.
See HTMLEdit Sample.
Header afxhtml.h