void CATTreeCtrl::OSUpdateTreeColors() { if (this->IsEnabled()) { TreeView_SetBkColor (fControlWnd, RGB(this->fBackgroundColor.r, this->fBackgroundColor.g, this->fBackgroundColor.b)); TreeView_SetTextColor(fControlWnd, RGB(this->fForegroundColor.r, this->fForegroundColor.g, this->fForegroundColor.b)); TreeView_SetLineColor(fControlWnd, RGB(this->fForegroundColor.r, this->fForegroundColor.g, this->fForegroundColor.b)); TreeView_SetInsertMarkColor(fControlWnd, RGB(this->fForegroundColor.r, this->fForegroundColor.g, this->fForegroundColor.b)); } else { TreeView_SetBkColor (fControlWnd, RGB(this->fBgDisColor.r, this->fBgDisColor.g, this->fBgDisColor.b)); TreeView_SetTextColor(fControlWnd, RGB(this->fFgDisColor.r, this->fFgDisColor.g, this->fFgDisColor.b)); TreeView_SetLineColor(fControlWnd, RGB(this->fFgDisColor.r, this->fFgDisColor.g, this->fFgDisColor.b)); TreeView_SetInsertMarkColor(fControlWnd, RGB(this->fFgDisColor.r, this->fFgDisColor.g, this->fFgDisColor.b)); } }
void CATTreeCtrl::OnParentCreate() { CATControlWnd::OnParentCreate(); TreeView_SetBkColor (fControlWnd, RGB(this->fBackgroundColor.r, this->fBackgroundColor.g, this->fBackgroundColor.b)); TreeView_SetTextColor(fControlWnd, RGB(this->fForegroundColor.r, this->fForegroundColor.g, this->fForegroundColor.b)); TreeView_SetLineColor(fControlWnd, RGB(this->fForegroundColor.r, this->fForegroundColor.g, this->fForegroundColor.b)); TreeView_SetInsertMarkColor(fControlWnd, RGB(this->fForegroundColor.r, this->fForegroundColor.g, this->fForegroundColor.b)); fFont = GetWindow()->OSGetFont(fFontName,fFontSize); ::SendMessage(fControlWnd,WM_SETFONT,(WPARAM)fFont,TRUE); OSClearTree(); OSRebuildTree(&fRootList); ExpandRoot(); }
COLORREF SetTextColor(COLORREF clr) { return TreeView_SetTextColor(m_hWnd, clr); }
void TreeView::SetTextColor(const uint color) const { TreeView_SetTextColor( control, color ); }
void TreeView::textColor ( const Color& color ) { TreeView_SetTextColor(handle(),color.value()); }