Share via


DHTML Editing Command Maps

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at DHTML Editing Command Maps.

The following macros can be used to map DHTML editing commands in CHtmlEditView-derived classes. For an example of their use, see HTMLEdit Sample.

DHTML Editing Command Map Macros

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.

DECLARE_DHTMLEDITING_CMDMAP

Declares a DHTML editing command map in a class.

DECLARE_DHTMLEDITING_CMDMAP
(className)   

Parameters

className
The name of the class.

Remarks

This macro is to be used in the definition of CHtmlEditView-derived classes.

Use BEGIN_DHTMLEDITING_CMDMAP to implement the map.

Example

See HTMLEdit Sample.

BEGIN_DHTMLEDITING_CMDMAP

Starts the definition of a DHTML editing command map within a class.

BEGIN_DHTMLEDITING_CMDMAP
(className)   

Parameters

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.

Remarks

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.

END_DHTMLEDITING_CMDMAP

Marks the end of a DHTML editing command map.

END_DHTMLEDITING_CMDMAP
()   

Remarks

Use in conjunction with BEGIN_DHTMLEDITING_CMDMAP.

Example

See HTMLEdit Sample.

DHTMLEDITING_CMD_ENTRY

Maps a command ID to an HTML editing command.

DHTMLEDITING_CMD_ENTRY
(cmdID,  dhtmlcmdID)   

Parameters

cmdID
The command ID (such as ID_EDIT_COPY).

dhtmlcmdID
The HTML editing command to which cmdID maps (such as IDM_COPY).

Example

See HTMLEdit Sample.

DHTMLEDITING_CMD_ENTRY_FUNC

Maps a command ID to an HTML editing command and message handler.

DHTMLEDITING_CMD_ENTRY_FUNC
(cmdID, dhtmlcmdID,  member_func_name)   

Parameters

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.

Example

See HTMLEdit Sample.

DHTMLEDITING_CMD_ENTRY_TYPE

Maps a command ID to an HTML editing command and user interface element.

DHTMLEDITING_CMD_ENTRY_TYPE
(cmdID  ,   dhtmlcmdID  ,    elemType)  

Parameters

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.

Example

See HTMLEdit Sample.

DHTMLEDITING_CMD_ENTRY_FUNC_TYPE

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)   

Parameters

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.

Example

See HTMLEdit Sample.

See Also

Macros and Globals