CGXControl::AddChild

virtual void AddChild(CGXChild* pChild);?

pChild

Pointer to the CGXChild object.

Remarks

Adds a CGXChild to the control.

A control can have several CGXChild objects. A good example for using child objects is CGXSpinEdit. CGXSpinEdit has up- and down-arrow buttons at the right side of the cell.

The rectangles for the CGXChild buttons are computed in OnInitChildren, which is called before the cell is drawn. The interior rectangle for the main control is computed with GetCellRect.

In the CGXSpinEdit example, the interior rectangle is used for displaying the text (or number). This rectangle is computed from the cell rectangle by subtracting the area needed for the spin-buttons.

Child buttons do send an OnClickedButton message to the control when they are clicked.

See Also

 CGXControl::OnInitChildren  CGXControl::GetCellRect  CGXChild

CGXControl

 Class Overview |  Class Members