CTreeCtrl::SetTextColor
COLORREF SetTextColor( COLORREF clr );
Return Value
A COLORREF value that represents the previous text color. If this value is -1, the control was using the system color for the text color.
Parameters
clr
A COLORREF value that contains the new text color. If this argument is -1, the control will revert to using the system color for the text color.
Remarks
This member function implements the behavior of the Win32 message , as described in the Platform SDK.
Example
// gain a pointer to the tree control
CTreeCtrl* pTree = (CTreeCtrl*) GetDlgItem(IDC_TREE1);
ASSERT(pTree != NULL);
// change text color to white and background to dark blue
pTree->SetTextColor(RGB(255, 255, 255));
ASSERT(pTree->GetTextColor() == RGB(255, 255, 255));
pTree->SetBkColor(RGB(0, 0, 128));
ASSERT(pTree->GetBkColor() == RGB(0, 0, 255));
// force repaint immediately
pTree->Invalidate();
CTreeCtrl Overview | Class Members | Hierarchy Chart
See Also CTreeCtrl::GetTextColor