Change the background color of tree nodes
I'm trying to change background color of tree nodes but get stuck with the following codes:
But the codes for custom drawing mess up with the others. Simply, the nodes are not added.
Pls kindly suggest me what to do or give me some infos to do this. Thanks in advance!
(I searched the forum and the answer seems to be here but points to broken link.)
////////////////////Resource //////////////////////////
Class
{
kMyPnlNodeWidgetBoss,
kTreeNodeWidgetBoss,
{
IID_IOBSERVER, kMyPnlNodeObserverImpl,
IID_IEVENTHANDLER, kMyPnlTrvNodeEHImpl,
IID_IPNLTRVSHADOWEVENTHANDLER, kTreeNodeEventHandlerImpl,
IID_IDRAGDROPSOURCE, kMyPnlTrvDragDropSourceImpl,
IID_IDRAGDROPTARGET, kMyPnlTrvDragDropTargetImpl,
IID_ICONTROLVIEW, kMyPnlTreeViewCtrlViewImpl, // <-----This mess up tree node
}
},
////////////////////class & Implementation -kMyPnlTreeViewCtrlViewImpl.cpp- //////////////////////////
class DBPnlTrvDraw: public DVTreeNodeControlView
{
public:
DBPnlTrvDraw(IPMUnknown* boss);
virtual ~DBPnlTrvDraw() {}
void DV_Draw(dvaui::drawbot::Drawbot* drawbotP);
private:
};
CREATE_PMINTERFACE(DBPnlTrvDraw, kMyPnlTreeViewCtrlViewImpl)
DBPnlTrvDraw::DBPnlTrvDraw(IPMUnknown* boss) : DVTreeNodeControlView(boss)
{
}
void DBPnlTrvDraw::DV_Draw(dvaui::drawbot::Drawbot* drawbotP)
{
DVControlView:: DV_Draw(drawbotP);
}