Click here to Skip to main content
15,917,176 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I have a base class that inherits from clistctrl and another class that inherits in my class.

class list:Clistctrl
class listgenrator:list


I have a pointer from base class that writes in initialize dialog:

list =new listgenerator();


when deleting list in destructor dialog I have an assertion error in destroywindow Clist the asertion is in line pmap->lookupPremanent(m_hwnd)
Posted
Updated 6-Mar-10 23:56pm
v3

hamidehkarimi wrote:
when delete list in destractor i have a assertion error


Which destructor and what is the assertion?


From the above I am assuming you mean in the CListctrl destructor but I cannot be sure. I also assume you get an assertion that m_hwnd is NULL, but again I cannot be sure. It is possible that you are destroying some window and then calling DestroyWindow() again. Try using the debugger to trace through what you are doing in your derived classes.
 
Share this answer
 
v2
Usually it is a good place to apply the visual properties of a dialog
in its OnInitDialog() - m_hWnd is already valid
and to degrade them in its OnDestroy() - m_hWnd is still valid :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900