c++ - CFormView cleanup when switching Views -
where best place cleanup gdi objects in cformview?
i have tried in cformview::ondestroy not called when switching views.
void cmyview::ondestroy() { cformview::ondestroy(); if (m_brush.m_hobject!=null) verify(m_brush.deleteobject()); }
the problem have many gdi objects created in oninitialupdate created everytime user activates view. need better method of cleaning gdi objects when user switches views.
Comments
Post a Comment