<< Return to Main Index

< Return to Class Index

CGXMapDWordToLong::Insert

void Insert(DWORD nId, DWORD nCount);

nId

Specifies where to insert the elements (before this id).

nCount

Number of elements.

Remarks

Inserts before nId the number of elements.

All elements in the map which have a key value greater than nId will be increased by nCount.

Each element in the map has an id and a value. When used for row heights, the id specifies the row and the value specifies the height. When you insert rows in the grid, and call Insert for this map, values will not be really inserted. Only their id will be increased.

For example:

Row 1 is 10, row 2 is 30 and row 5 is 20.

Now, you want to insert a row above row 2: you call Insert(2, 1);

Insert will change the ids:

Row 1 will still be 10, row 3 (previous 2) will be 30 and row 6 (previous 5) will be 20.

CGXMapDWordToLong

Class Overview | Class Members