What I am doing now is doing:
CBasePane* pPane = dynamic_cast<CBasePane*>(pWnd->GetPane());
while(pPane != NULL)
{
pWnd->RemovePane(pPane);
pPane->DestroyWindow();
pPane = dynamic_cast<CBasePane*>(pWnd->GetPane());
}
to destroy all the panes within it when closed. I am dynamically
creating these panes. I want these panes gone when the Miniframe is
closed. This seems to work but I am worried this is not the proper way
to do it since GetPane() returns a CWnd* instead, thats why I am doing
the dynamic_cast. Is there a better way to iterate through all the
panes to destroy them?
Thanks.
So what you are doing works fine.
Are you deleting the object somewhere? I don't see a call to delete.
AliR.
"Psychoboy" <psyc...@gmail.com> wrote in message
news:d79ebdef-d0ce-4687...@q4g2000yqm.googlegroups.com...
On Jan 5, 8:40 am, "AliR" <A...@online.nospam> wrote:
> It really doesn't make a difference what GetPane returns, it is still a
> pointer to your object that inherits from CWnd in one way or another. That
> is what dynamic_cast is for.
>
> So what you are doing works fine.
>
> Are you deleting the object somewhere? I don't see a call to delete.
>
> AliR.
>
> "Psychoboy" <psyco...@gmail.com> wrote in message