CTreeCtrl lables help please
-
why the bellow code doesnt make CTreeCtrl lables trasparent? the same method works fine for CListCtrl SetBkMode() also if i uncomment it doesnt make lables trasparent lables r painted with black color background instead of trasparent butif i use any other color other than CLR_NONE or TRASPARENT .. it will paint with the color i used properly but doesnt work with trasparent. help me plz please some one give me solution void CLeftPaneTreeCtrl::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult) { switch(pNMHDR->code) { case NM_CUSTOMDRAW: { LPNMTVCUSTOMDRAW lplvcd = (LPNMTVCUSTOMDRAW)pNMHDR; //SetBkMode(lplvcd->nmcd.hdc,TRANSPARENT); lplvcd->clrTextBk = CLR_NONE; if(lplvcd->nmcd.dwDrawStage == CDDS_PREPAINT) { *pResult = CDRF_NOTIFYITEMDRAW; return ; } if(lplvcd->nmcd.dwDrawStage == CDDS_ITEMPREPAINT) { *pResult = CDRF_NOTIFYPOSTPAINT; return; } } } }
-
why the bellow code doesnt make CTreeCtrl lables trasparent? the same method works fine for CListCtrl SetBkMode() also if i uncomment it doesnt make lables trasparent lables r painted with black color background instead of trasparent butif i use any other color other than CLR_NONE or TRASPARENT .. it will paint with the color i used properly but doesnt work with trasparent. help me plz please some one give me solution void CLeftPaneTreeCtrl::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult) { switch(pNMHDR->code) { case NM_CUSTOMDRAW: { LPNMTVCUSTOMDRAW lplvcd = (LPNMTVCUSTOMDRAW)pNMHDR; //SetBkMode(lplvcd->nmcd.hdc,TRANSPARENT); lplvcd->clrTextBk = CLR_NONE; if(lplvcd->nmcd.dwDrawStage == CDDS_PREPAINT) { *pResult = CDRF_NOTIFYITEMDRAW; return ; } if(lplvcd->nmcd.dwDrawStage == CDDS_ITEMPREPAINT) { *pResult = CDRF_NOTIFYPOSTPAINT; return; } } } }
If you have a look through last week's postings on this forum, you will find a few questions about transparent tree controls, backgrounds and labels. You can ignore the questions by George_George, so that will save you 50% of the effort. (Just because he didn't ask it...) Iain.
Iain Clarke appearing by Special Request of CPallini.
-
If you have a look through last week's postings on this forum, you will find a few questions about transparent tree controls, backgrounds and labels. You can ignore the questions by George_George, so that will save you 50% of the effort. (Just because he didn't ask it...) Iain.
Iain Clarke appearing by Special Request of CPallini.
Iain Clarke wrote:
You can ignore the questions by George_George, so that will save you 50% of the effort.
:laugh:
Cédric Moonen Software developer
Charting control [v1.2]