Maybe the problem is here,
DrawA.SelectObject(CreatePen(PS_SOLID,0,ColorPen));
you can't release the CPen resource,
do as below:
CPen pen(PS_SOLID,0,ColorPen);
CPen* pOldPen=DrawA.SelectObject(&pen);
.
.
.
DrawA.selecObject(pOldPen);(after you end your drawing operation,restore the old pen)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.