Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CTreeCtrl TV_ITEM labels - trasparent help needed plz Pin
Iain Clarke, Warrior Programmer29-Jan-08 23:58
Iain Clarke, Warrior Programmer29-Jan-08 23:58 
GeneralRe: CTreeCtrl TV_ITEM labels - trasparent help needed plz Pin
sarat30-Jan-08 3:45
sarat30-Jan-08 3:45 
GeneralRe: CTreeCtrl TV_ITEM labels - trasparent help needed plz Pin
Iain Clarke, Warrior Programmer30-Jan-08 4:11
Iain Clarke, Warrior Programmer30-Jan-08 4:11 
GeneralRe: CTreeCtrl TV_ITEM labels - trasparent help needed plz Pin
sarat30-Jan-08 4:34
sarat30-Jan-08 4:34 
GeneralRe: CTreeCtrl TV_ITEM labels - trasparent help needed plz Pin
Iain Clarke, Warrior Programmer30-Jan-08 4:39
Iain Clarke, Warrior Programmer30-Jan-08 4:39 
GeneralRe: CTreeCtrl TV_ITEM labels - trasparent help needed plz Pin
sarat30-Jan-08 4:47
sarat30-Jan-08 4:47 
GeneralCTreeCtrl TV_ITEM labels - are painted with black background instead of trasparent Pin
sarat30-Jan-08 23:06
sarat30-Jan-08 23:06 
GeneralRe: CTreeCtrl TV_ITEM labels - are painted with black background instead of trasparent Pin
sarat1-Feb-08 2:56
sarat1-Feb-08 2:56 
in my Tree control OnCustomDraw i have written code like this

void CLeftPaneTreeCtrl::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult)
{
switch(pNMHDR->code)
{
case NM_CUSTOMDRAW:
{
LPNMTVCUSTOMDRAW lptvcd = (LPNMTVCUSTOMDRAW )pNMHDR;

//lptvcd->clrTextBk = CLR_NONE ;
//lptvcd->clrText = (RGB(0,0,255));

SetTextColor(RGB(255, 0, 0));
SetBkMode(lplvcd->nmcd.hdc,TRANSPARENT);

switch (lplvcd->nmcd.dwDrawStage)
{

case CDDS_PREPAINT:

// Need to process this case and set pResult to
// CDRF_NOTIFYITEMDRAW, otherwise parent will never receive
//CDDS_ITEMPREPAINT notification. (GGH)

*pResult = CDRF_NOTIFYITEMDRAW;
return;

}
}
}
}


in that code
SetTextColor(RGB(255, 0, 0)); works fine

SetBkMode(lplvcd->nmcd.hdc,TRANSPARENT); doesnt work ( it doesnt make TreeCtrl lables trasparent

CLeftPaneTreeCtrl is Derived class of CTreeCtrl
My I am hosting TreeCtrl on CView derived class MyView


and
if i uncomment both the lined comented in the code

lptvcd->clrTextBk = CLR_NONE ; -> doent work it paints Black background instead of transparent color

but any other color for eg lptvcd->clrTextBk = RGB(0,0,225) works fine

lptvcd->clrText = (RGB(0,0,255)); -> works fine


now I am not able to make lables trasparent



but one more thing ... the same method works fine in my CListCtrl with respect to trasparent lables ... ofcouse there r some other probs butfirst i wnana sort out the rpob with tree control transparent labels first


am looking for solution please help me out
GeneralRe: CTreeCtrl TV_ITEM labels - are painted with black background instead of trasparent [modified] Pin
sarat4-Feb-08 17:47
sarat4-Feb-08 17:47 
GeneralHour Glass won't go away! Pin
@largeinsd29-Jan-08 18:18
@largeinsd29-Jan-08 18:18 
GeneralRe: Hour Glass won't go away! Pin
@largeinsd29-Jan-08 18:25
@largeinsd29-Jan-08 18:25 
GeneralRe: Hour Glass won't go away! Pin
David Crow30-Jan-08 3:42
David Crow30-Jan-08 3:42 
QuestionRe: Hour Glass won't go away! Pin
David Crow30-Jan-08 3:43
David Crow30-Jan-08 3:43 
GeneralRe: Hour Glass won't go away! Pin
@largeinsd30-Jan-08 6:13
@largeinsd30-Jan-08 6:13 
QuestionRe: Hour Glass won't go away! Pin
David Crow30-Jan-08 6:21
David Crow30-Jan-08 6:21 
GeneralRe: Hour Glass won't go away! Pin
@largeinsd30-Jan-08 8:10
@largeinsd30-Jan-08 8:10 
QuestionRe: Hour Glass won't go away! Pin
David Crow30-Jan-08 8:22
David Crow30-Jan-08 8:22 
GeneralRe: Hour Glass won't go away! Pin
@largeinsd31-Jan-08 8:24
@largeinsd31-Jan-08 8:24 
GeneralRegarding integration of two different projects Pin
H4u3229-Jan-08 17:46
H4u3229-Jan-08 17:46 
GeneralRe: Regarding integration of two different projects Pin
Maxwell Chen29-Jan-08 18:05
Maxwell Chen29-Jan-08 18:05 
GeneralRe: Regarding integration of two different projects Pin
H4u3229-Jan-08 19:12
H4u3229-Jan-08 19:12 
QuestionRe: Regarding integration of two different projects Pin
Maxwell Chen29-Jan-08 19:34
Maxwell Chen29-Jan-08 19:34 
GeneralRe: Regarding integration of two different projects Pin
H4u3229-Jan-08 19:35
H4u3229-Jan-08 19:35 
GeneralRe: Regarding integration of two different projects Pin
Maxwell Chen29-Jan-08 19:43
Maxwell Chen29-Jan-08 19:43 
GeneralRe: Regarding integration of two different projects Pin
manish.patel29-Jan-08 21:27
manish.patel29-Jan-08 21:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.