<< Return to Main Index

< Return to Class Index

CGXGridCore::CalcBufferDimension

virtual BOOL CalcBufferDimension(LPCTSTR psz, DWORD size, ROWCOL& rnRows, ROWCOL& rnCols);

psz

A pointer to the buffer which contains the data in tab-delimited form.

size

Specifies the size of the buffer.

rnRows

A reference to a ROWCOL where the number of rows will be returned.

rnCols

A reference to a ROWCOL where the number of columns will be returned.

Return Value

TRUE if the buffer contains valid data; FALSE if the data in the buffer cannot be pasted into the grid.

Remarks

Determines the number of rows and columns in the specified buffer. The text values must be available in tab-delimited form in the buffer. Newline characters indicate that a new row should be started.

CalcBufferDimension is normally only called from OLE Drag&Drop routines to determine the boundaries of the focus rectangle when data are dragged in from other applications in CF_TEXT clipboard format.

Control-Factory Specific ->

This method has been implemented using the abstraction mechanism as discussed in the chapter "Reducing the size of your application" in the user's guide. A call to the ImplementTextDataExchange method from within the control factory class' InitializeGridComponents method will make the concrete implementation of this method available to your application.

If no concrete implementation is available this method returns FALSE. A warning will be displayed in the debug window.

END Control-Factory Specific

See Also

CGXGridCore::PasteTextFromBuffer CGXGridCore::Paste

CGXGridCore

Class Overview | Class Members