Dropping on the Tool Palette

If your Tool Palette client implements drop functionality, users can create new tools on your tool palettes simply by dropping objects from a variety of sources. Objects that can be dropped from other sources include

The framework handles tools and tool palettes that are dropped on the Tool Palettes window. When an unrecognized object is dropped, the framework forwards it to each tool in the workspace until it finds a tool that accepts the object. If one of your tools takes the object, your application controls the Tool Palette window's response to it.

To accept unrecognized dropped objects, a Tool Palette application's IAcadStockTool object implements the IAcadToolDropTarget interface. This interface improves on the generic IDropTarget version in that it can create multiple tools from a single drop containing multiple objects.

When your application accepts dropped objects, it typically reads the objects' properties and applies them to your tool's current state. After your Drop() method returns, the framework creates one or more new tools with the properties that you have applied, and adds the new tools to your tool palette. Applications use the IAcadStockTool::CreateTool() method to create new tools from dropped objects. See the ObjectARX Reference for tips on implementing the IAcadToolDropTarget::Drop() method.