<< Return to Main Index

< Return to Class Index

CGXGridDropTarget::Register

BOOL Register(CGXGridCore* pGrid, DWORD dwFlags = GX_DNDEGDESCROLL | GX_DNDAUTOSCROLL | GX_DNDTEXT | GX_DNDSTYLES);

pGrid

A pointer to the grid object.

dwFlags

Specifies the drop target behavior. dwFlags can be a combination of any of the following flags:

GX_DNDEGDESCROLL - enable autoscrolling when user drags the mouse near the edge inside of the drop target window.

This function will also assign dwFlags to the CGXGridCore::m_nClipboardFlags attribute to make sure that Copy/Paste behavior is consistent with Drag and Drop.

See the class description for an example.

Note:

Objective Grid 6.1 introduced a new method that simplifies the registration of a grid as drop target compared to the steps necessary with Objective Grid version 6.0 or earlier. There is no need for you to learn details about the CGXGridDropTarget class any more.

Simply call

   EnableOleDropTarget();

at grid initialization time.

If you want to customize the OLE Dnd behavior you can pass a combination of flags as parameter.

Example:

   EnableOleDropTarget(GX_DNDEGDESCROLL | GX_DNDAUTOSCROLL | GX_DNDTEXT | GX_DNDSTYLES);

See Also

CGXGridCore::EnableOleDataSource CGXGridCore::m_nClipboardFlags CGXGridCore::EnableOleDropTarget

CGXGridDropTarget

Class Overview | Class Members