I have a big problem, my program works fine, but when I do one actioin e.g. 100 times, after RedrawWindow() all fonts, color,etc. get crazy, all the memory is away,... horrible things. So here are a few questions, because I don't know, what to do.
In a procedure, if I want to free the memory I do:
LPTSTR s=new char[100];
delete [] s;
CPen pen1;
pen1.CreatePen(...);
pen1.DeleteObject();
CRect aaa;
GetWindowRect(&aaa);
...is automatically destroyed on the end of the function (I hope)
CDC *dc=GetDC();
...it's destroyed automatically
Is there an error in this?
pls help
bubak
In a procedure, if I want to free the memory I do:
LPTSTR s=new char[100];
delete [] s;
CPen pen1;
pen1.CreatePen(...);
pen1.DeleteObject();
CRect aaa;
GetWindowRect(&aaa);
...is automatically destroyed on the end of the function (I hope)
CDC *dc=GetDC();
...it's destroyed automatically
Is there an error in this?
pls help
bubak