ZeeGrid Control Message

ZGM_DIMGRID


ZGM_DIMGRID

An application sends a ZGM_DIMGRID message to dimension or redimension an existing ZeeGrid. The ZGM_DIMGRID message sets the total number of columns, number of visible columns, and the number of fixed columns in the ZeeGrid.

ZGM_DIMGRID
wParam = (WPARAM) Columns;       //grid total columns and visible columns
lParam = (LPARAM) fixed_columns; //grid fixed columns

Parameters

columns
Value of wParam. The LOWORD of wParam defines the number of total columns the ZeeGrid will have. The HIWORD of wParam is the number of visible columns. The number of visible columns must be greater than or equal to 0 and less than or equal to the total number of columns. If the HIWORD of wParam is 0, the number of visible columns will be equal to the total number of columns. If the LOWORD of wParam is less than 1, the LOWORD of wParam will be set to 1. All ZeeGrids must be dimensioned to have at least 1 column.

fixed_columns
Value of lParam. The number of fixed columns in the ZeeGrid. Fixed columns will not scroll off the ZeeGrid window when the ZeeGrid is scrolled horizontally. The number of fixed columns must be less than or equal to the number of visible columns specified in the HIWORD of wParam.

Return Values

This message does not return a value.

Remarks

If an existing and populated ZeeGrid is sent the ZGM_DIMGRID message, all existing data and allocated memory for that ZeeGrid is deleted and released back to the heap before the ZeeGrid is redimensioned.

After sending the ZGM_DIMGRID message to your ZeeGrid, it will be formatted with the number of columns specified and 0 rows.

ZeeGrid columns are defined in the ZGM_DIMGRID message and cannot be modified without issuing another ZGM_DIMGRID. Note that rows are not dimensioned. Rows are dynamically allocated as needed.

Code Example


//
//dimension a ZeeGrid with 8 columns and no fixed columns
//
SendMessage(hgrid,ZGM_DIMGRID,8,0);
//
//dimension a ZeeGrid with 10 columns, only 8 of which
//are visible and 2 fixed columns
//
SendMessage(hgrid,ZGM_DIMGRID,MAKEWPARAM(10,8),2);

Copyright © 2002-2016 by David Hillard