Skip to content

Latest commit

 

History

History
176 lines (108 loc) · 6.42 KB

snap-in-object-macros.md

File metadata and controls

176 lines (108 loc) · 6.42 KB
description title ms.date f1_keywords ms.assetid
Learn more about: Snap-In Object Macros
Snap-In Object Macros
11/04/2016
atlsnap/ATL::BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP
atlsnap/ATL::BEGIN_SNAPINTOOLBARID_MAP
atlsnap/ATL::END_EXTENSION_SNAPIN_NODEINFO_MAP
atlsnap/ATL::END_SNAPINTOOLBARID_MAP
atlsnap/ATL::EXTENSION_SNAPIN_DATACLASS
atlsnap/ATL::EXTENSION_SNAPIN_NODEINFO_ENTRY
atlsnap/ATL::SNAPINMENUID
atlsnap/ATL::SNAPINTOOLBARID_ENTRY
ATLSNAP/BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP
ATLSNAP/BEGIN_SNAPINTOOLBARID_MAP
ATLSNAP/END_EXTENSION_SNAPIN_NODEINFO_MAP
ATLSNAP/END_SNAPINTOOLBARID_MAP
ATLSNAP/EXTENSION_SNAPIN_DATACLASS
ATLSNAP/EXTENSION_SNAPIN_NODEINFO_ENTRY
ATLSNAP/SNAPINMENUID
ATLSNAP/SNAPINTOOLBARID_ENTRY
4e9850c0-e395-4929-86c9-584a81828053

Snap-In Object Macros

These macros provide support for snap-in extensions.

Name Description
BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP Marks the beginning of the snap-in extension data class map for a Snap-In object.
BEGIN_SNAPINTOOLBARID_MAP Marks the beginning of the toolbar map for a Snap-In object.
END_EXTENSION_SNAPIN_NODEINFO_MAP Marks the end of the snap-in extension data class map for a Snap-In object.
END_SNAPINTOOLBARID_MAP Marks the end of the toolbar map for a Snap-In object.
EXTENSION_SNAPIN_DATACLASS Creates a data member for the data class of the snap-in extension.
EXTENSION_SNAPIN_NODEINFO_ENTRY Enters a snap-in extension data class into the snap-in extension data class map of the Snap-In object.
SNAPINMENUID Declares the ID of the context menu used by the Snap-In object.
SNAPINTOOLBARID_ENTRY Enters a toolbar into the toolbar map of the Snap-In object.

Requirements

Header: atlsnap.h

BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP

Marks the beginning of the snap-in extension data class map.

BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP(classname)

Parameters

classname
[in] The name of the snap-in extension data class.

Remarks

Start your snap-in extension map with the BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP macro, add entries for each of your snap-in extension data types with the EXTENSION_SNAPIN_NODEINFO_ENTRY macro, and complete the map with the END_EXTENSION_SNAPIN_NODEINFO_MAP macro.

Example

[!code-cppNVC_ATL_Windowing#105]

BEGIN_SNAPINTOOLBARID_MAP

Declares the beginning of the toolbar ID map for the Snap-In object.

BEGIN_SNAPINTOOLBARID_MAP(_class)

Parameters

_class
[in] Specifies the Snap-In object class.

Example

[!code-cppNVC_ATL_Windowing#106]

END_EXTENSION_SNAPIN_NODEINFO_MAP

Marks the end of the snap-in extension data class map.

END_EXTENSION_SNAPIN_NODEINFO_MAP()

Remarks

Start your snap-in extension map with the BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP macro, add entries for each of your extension snap-in data types with the EXTENSION_SNAPIN_NODEINFO_ENTRY macro, and complete the map with the END_EXTENSION_SNAPIN_NODEINFO_MAP macro.

Example

See the example for BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP.

END_SNAPINTOOLBARID_MAP

Declares the end of the toolbar ID map for the Snap-In object.

END_SNAPINTOOLBARID_MAP( _class )

Parameters

_class
[in] Specifies the Snap-In object class.

Example

See the example for BEGIN_SNAPINTOOLBARID_MAP.

EXTENSION_SNAPIN_DATACLASS

Adds a data member to the snap-in extension data class for an ISnapInItemImpl-derived class.

EXTENSION_SNAPIN_DATACLASS(dataClass )

Parameters

dataClass
[in] The data class of the snap-in extension.

Remarks

This class should also be entered into a snap-in extension data class map. Start your snap-in extension data class map with the BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP macro, add entries for each of your snap-in extension data types with the EXTENSION_SNAPIN_NODEINFO_ENTRY macro, and complete the map with the END_EXTENSION_SNAPIN_NODEINFO_MAP macro.

Example

[!code-cppNVC_ATL_Windowing#105]

EXTENSION_SNAPIN_NODEINFO_ENTRY

Adds a snap-in extension data class to the snap-in extension data class map.

EXTENSION_SNAPIN_NODEINFO_ENTRY( dataClass )

Parameters

dataClass
[in] The data class of the snap-in extension.

Remarks

Start your snap-in extension data class map with the BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP macro, add entries for each of your snap-in extension data types with the EXTENSION_SNAPIN_NODEINFO_ENTRY macro, and complete the map with the END_EXTENSION_SNAPIN_NODEINFO_MAP macro.

Example

See the example for BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP.

SNAPINMENUID

Use this macro to declare the context menu resource of the Snap-In object.

SNAPINMENUID( id )

Parameters

id
[in] Identifies the context menu of the Snap-In object.

SNAPINTOOLBARID_ENTRY

Use this macro to enter a toolbar ID into the Snap-In object's toolbar ID map.

SNAPINTOOLBARID_ENTRY( id )

Parameters

id
[in] Identifies the toolbar control.

Remarks

The BEGIN_SNAPINTOOLBARID_MAP macro marks the beginning of the toolbar ID map; the END_SNAPINTOOLBARID_MAP macro marks the end.

Example

See the example for BEGIN_SNAPINTOOLBARID_MAP.

See also

Macros