<< Return to Main Index

< Return to Class Index

class CGXMapDWordToLong: public CGXCollMapDWordToLong

CGXMapDWordToLong extends CGXCollMapDWordToLong with functionality to insert, move and remove elements. It also adds support for serialization. CGXCollMapDWordToLong is a collection class which maps DWORD values to LONG values. Member functions are the same as for CMapWordToPtr. See the reference for CMapWordToPtr for further details.

The class is mainly used to maintain row heights and column widths.

When you need to insert, move or remove rows or columns, all you need to do is to call the Insert, Move or Remove method. Each of these functions will perform the necessary change for all elements in the map.

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.

The Remove and Move methods work the same way.

#include <gxall.h>

See Also

CGXMapCellToOb

CGXMapDWordToLong

Class Members