Click to See Complete Forum and Search --> : change color of HDC?


Yoh-hei
April 19th, 1999, 03:29 AM
Hello:
I knows if you want change the color of a pen.you must
setup:
CPen* oldpen;
.....
oldpen=pDC->SelectObject(&newpen);
.....
pDC->SelectObject(oldpen);
.....
Now I setup a HDC m_memdc.It's the bitmap of screen area.
I want change the color of m_memdc .Code is:
newpen.CreatePen(...);
SelectObject(m_memdc,&newpen);
...............................
newpen.DeleteObject();
Setup one color is ok!But and then setup the second
color is invalidate.I want memby need setup oldpen,like
CPen.But I test all kinds of code it's error run.
Would you help me? add code?
Thank you!