Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

CExtGridWnd supports one or more header rows both at top and at bottom. If you have at least one header row at top, you can set the width of any column by specifying the width of the corresponding cell in that header row:

OuterRowCountTopSet( 1L, false );
// Number of rows at top, the method of CExtGridWnd
CExtGridCellHeader * pCell =
STATIC_DOWNCAST(
CExtGridCellHeader,
GridCellGetOuterAtTop(
nColNo, // Column number
0L, // Header row number, should be 0 here
RUNTIME_CLASS(CExtGridCellHeader)
)
);
pCell->ExtentSet( 40, -1 ); // Minimum width
pCell->ExtentSet(50); // Current width (default value)
pCell->ExtentSet(100, 1); // Maximum width