CGXGridCore::UpdateInsertCols
virtual void UpdateInsertCols(ROWCOL nCol, ROWCOL nCount, UINT flags, BOOL bCreateHint = FALSE);?
nCol
Specifies the column id.
nCount
Specifies the number of columns to be inserted.
flags
-
Specifies the update technique:
- GX_UPDATENOW specifies to scroll the window contents and call UpdateWindow after invalidating the window.
- GX_SMART specifies to scroll the window contents without calling UpdateWindow after the last invalidation.
GX_INVALIDATE simply invalidates the window area right of nCol.
bCreateHint
Specifies if a hint should be created.
Remarks
Overridable method which updates the window after inserting columns.
The method creates the following hint:
CGXGridHint hint(gxHintUpdateInsertCols, m_nViewID);
hint.nCol1 = nCol;
hint.dwParam = nCount;
hint.flags = flags;
You can override this method if you need to change the hint.
Example
This example illustrates how to update the window after inserting several columns.
// insert space and initialize column
for (WORD n = 0; n < nCount; n++)
m_pDoc->InsertCol(n, contents);
UpdateInsertCols(nCol, nCount, GX_UPDATENOW, TRUE);
See Also
CGXGridCore::InsertColsCGXGridHint