المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : PostNCDestroy Problem



C++ Programming
04-06-2009, 02:51 PM
Hi All,

Problem:-

Using MFC,Dialog Based applications.

I have created one class which is derived from CDialog. In that iam doing some customizations such as drawings and all. And i have overrided PostNCDestroy() in the class. In that function, i am destroying the this ptr such that more than one thread can make use of it. I have created one testapp to run this class. In the dlg class iam newing the object(local) of the class and calling its functions. My problem is after closing the maindialog One heap assertion coming stating not a valid heapptr like that.. What will be the reason?? please give me some solutions..

Regards,
Spk 521