Click here to Skip to main content
15,912,897 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Client server problem Pin
VBZ25-Apr-04 21:16
VBZ25-Apr-04 21:16 
QuestionCan we use the "Source Browser" in VC.net Pin
hottang21-Apr-04 23:22
hottang21-Apr-04 23:22 
AnswerRe: Can we use the "Source Browser" in VC.net Pin
Maxwell Chen21-Apr-04 23:33
Maxwell Chen21-Apr-04 23:33 
GeneralRe: Can we use the "Source Browser" in VC.net Pin
hottang21-Apr-04 23:57
hottang21-Apr-04 23:57 
GeneralRe: Can we use the "Source Browser" in VC.net Pin
Maxwell Chen22-Apr-04 16:15
Maxwell Chen22-Apr-04 16:15 
GeneralProblem with sizing Pin
ykutanoor21-Apr-04 23:01
ykutanoor21-Apr-04 23:01 
GeneralRe: Problem with sizing Pin
Cedric Moonen22-Apr-04 1:13
Cedric Moonen22-Apr-04 1:13 
GeneralCImageList + CTreeCtrl problem Pin
YaronNir21-Apr-04 22:57
YaronNir21-Apr-04 22:57 
Hi all,

I have my class that Inherites from CTreeCtrl.
I override OnPain() and i draw the items myself.
next to each item i am trying to draw an image

i use the following code:

// creating the bitmap:
m_imageOptions.Create(IMAGE_DIMENTIONS,
		  IMAGE_DIMENTIONS,
		  ILC_COLOR24 | ILC_MASK,
		  MAX_OPTIONS_NUM,
		  0);


// drawing the bitmap OnPaint() override
hBmp = pDlgInf->GetBmp();
CBitmap bmp;
if (NULL != hBmp)
{
 bmp.Attach(hBmp);
 iImage = m_imageOptions.Add(&bmp,TRANSPARENT_CLR);
 bmp.Detach();
 ::DeleteObject(hBmp);
}				
		
CPoint pnt(rc.left + SPACE_WIDTH / 5,rcText.top);
m_imageOptions.Draw(pDC,iImage,pnt,ILD_TRANSPARENT);


// don't handle the OnEraseBkgrnd
BOOL CPrfTreeCtrl::OnEraseBkgnd(CDC* pDC) 
{
	return TRUE;
}


problem:
I manage to see the image next to the item, but if i drag my dialog (the tree
is placed over a dialog), outside of the screen boundaries and then drag it
back within the screen boundaries, the image is gone...other drawing of the tree (such as the items) are correct....

what am i doing wrong? can any1 help?

thanks in advanced

Yaron


Ask not what your application can do for you,
Ask what you can do for your application
QuestionHow to create a list ctrl with transparent background? Pin
Avraham21-Apr-04 22:27
Avraham21-Apr-04 22:27 
AnswerRe: How to create a list ctrl with transparent background? Pin
Rob Caldecott21-Apr-04 23:05
Rob Caldecott21-Apr-04 23:05 
GeneralRe: How to create a list ctrl with transparent background? Pin
Avraham21-Apr-04 23:53
Avraham21-Apr-04 23:53 
GeneralRotating bitmap around its center Pin
Gadjuka21-Apr-04 21:57
Gadjuka21-Apr-04 21:57 
GeneralHelp with CSplitterWnd->CreateView method,trying to load a CDialog derived class Pin
Victor Nikol21-Apr-04 21:25
Victor Nikol21-Apr-04 21:25 
GeneralHelp finding old intel MMX application notes Pin
uus9921-Apr-04 20:58
uus9921-Apr-04 20:58 
GeneralRe: Help finding old intel MMX application notes Pin
uus9921-Apr-04 21:32
uus9921-Apr-04 21:32 
GeneralRe: Help finding old intel MMX application notes Pin
Anonymous21-Apr-04 23:45
Anonymous21-Apr-04 23:45 
GeneralRe: Help finding old intel MMX application notes Pin
uus9922-Apr-04 20:24
uus9922-Apr-04 20:24 
Generaldisplaying Integer. Pin
amardude21-Apr-04 20:52
amardude21-Apr-04 20:52 
GeneralRe: displaying Integer. Pin
Maxwell Chen21-Apr-04 21:07
Maxwell Chen21-Apr-04 21:07 
GeneralRe: displaying Integer. Pin
amardude21-Apr-04 21:57
amardude21-Apr-04 21:57 
GeneralRe: displaying Integer. Pin
Maxwell Chen21-Apr-04 22:24
Maxwell Chen21-Apr-04 22:24 
GeneralRe: displaying Integer. Pin
Anonymous22-Apr-04 5:47
Anonymous22-Apr-04 5:47 
GeneralRe: displaying Integer. Pin
Rory Solley21-Apr-04 22:49
Rory Solley21-Apr-04 22:49 
GeneralRe: displaying Integer. Pin
Maxwell Chen21-Apr-04 23:03
Maxwell Chen21-Apr-04 23:03 
GeneralRe: displaying Integer. Pin
Rory Solley21-Apr-04 23:11
Rory Solley21-Apr-04 23:11 

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.