|Yes - Overriding PostNcDestroy did it . In my traces exception also ended up at that point.
Just wasn't comfortable stomping on it like that. Still Kinda curious what I'm doing wrong though -- can't find anything.
I've tried exiting the moment I enter OnInitialDialog -- still throws the @#$%! Heap exception!
So I'm guessing the heap is still corrupted on exit -HoHum
Putting the Create at the end of the OnInitialDialog doesn't matter here - I ended Up creating one function In LBA that registered the LBA class(First time through)then created the LBA frame (which triggered the LBA::OnCreate for the toolbar and Listbox)...
So Making all the creation code in the LBA class -- cuts down on coding to use the class
And used that function in OnInitialDialog (almost at the start)
LBA m_movieframe in Mydialog.h
m_movieframe.UpgradeLB_LBA(CWnd *ptr to static placeholder,&m_movieframe,CWnd *ptr dialog)
passed ptr parent as at the called point as LBA *Cwnd didn't exist (so hard to get to the parent)
This function grabs the static's rectangle ,destroys the static ,reassigns the CtrlId to the frames listbox (Important for trapping LBSelChanged messages ... via the dialogs messagemap.) gotta have a hard CtrlId target
I'm using 6 of this LBA Class in my Dialog
Now --Just to get the trap the messages toolbar, listbox messages to handlers (Duck Soup)