Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Shortcut Bar
  New Posts New Posts RSS Feed - Shortcut bar with CView derived pane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Shortcut bar with CView derived pane

 Post Reply Post Reply
Author
Message
mailhaim View Drop Down
Newbie
Newbie


Joined: 28 September 2005
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote mailhaim Quote  Post ReplyReply Direct Link To This Post Topic: Shortcut bar with CView derived pane
    Posted: 14 November 2006 at 8:10am
I'm trying to use CListView as a pane of a shortcut bar. when the shortcut bar get destroyed, this pane generate assertion.
Can I use CView derived classes as panes of shortcut bar? if yes, is there an example of that ?

Regards, Haim
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 14 November 2006 at 8:54am
Hello,
by default CView derived classes destroy self in CView::PostNcDestroy.
 
void CView::PostNcDestroy()
{
 // default for views is to allocate them on the heap
 //  the default post-cleanup is to 'delete this'.
 //  never explicitly call 'delete' on a view
 delete this;
}
 
So, you have to create view dynamically and don't call delete to destroy it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.