Click here to Skip to main content
15,901,368 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Jochen Arndt8-Feb-12 3:19
professionalJochen Arndt8-Feb-12 3:19 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1238-Feb-12 4:04
Fallen1238-Feb-12 4:04 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Jochen Arndt8-Feb-12 4:20
professionalJochen Arndt8-Feb-12 4:20 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1238-Feb-12 4:44
Fallen1238-Feb-12 4:44 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Eugen Podsypalnikov8-Feb-12 4:53
Eugen Podsypalnikov8-Feb-12 4:53 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1239-Feb-12 10:19
Fallen1239-Feb-12 10:19 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Eugen Podsypalnikov9-Feb-12 20:30
Eugen Podsypalnikov9-Feb-12 20:30 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen12310-Feb-12 5:35
Fallen12310-Feb-12 5:35 
Yes - Overriding PostNcDestroy did it Blush | :O Blush | :O Thumbs Up | :thumbsup: . 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)
AnswerRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Richard MacCutchan5-Feb-12 23:17
mveRichard MacCutchan5-Feb-12 23:17 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1235-Feb-12 23:38
Fallen1235-Feb-12 23:38 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Richard MacCutchan6-Feb-12 0:04
mveRichard MacCutchan6-Feb-12 0:04 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1236-Feb-12 0:35
Fallen1236-Feb-12 0:35 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Richard MacCutchan6-Feb-12 1:14
mveRichard MacCutchan6-Feb-12 1:14 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1236-Feb-12 2:16
Fallen1236-Feb-12 2:16 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Richard MacCutchan6-Feb-12 3:03
mveRichard MacCutchan6-Feb-12 3:03 
GeneralRe: VS 2010 MFC derived CListbox with dynamically addedCtoolbar Pin
Fallen1236-Feb-12 6:35
Fallen1236-Feb-12 6:35 
QuestionSegFault Pin
chidacode5-Feb-12 7:07
chidacode5-Feb-12 7:07 
AnswerRe: SegFault Pin
Albert Holguin5-Feb-12 8:45
professionalAlbert Holguin5-Feb-12 8:45 
AnswerRe: SegFault Pin
CPallini5-Feb-12 21:57
mveCPallini5-Feb-12 21:57 
GeneralRe: SegFault Pin
Albert Holguin6-Feb-12 10:14
professionalAlbert Holguin6-Feb-12 10:14 
AnswerRe: SegFault Pin
Stephen Hewitt6-Feb-12 4:07
Stephen Hewitt6-Feb-12 4:07 
QuestionTCP/IP problems Pin
ForNow4-Feb-12 16:27
ForNow4-Feb-12 16:27 
AnswerRe: TCP/IP problems Pin
Mohibur Rashid5-Feb-12 4:34
professionalMohibur Rashid5-Feb-12 4:34 
AnswerRe: TCP/IP problems Pin
Albert Holguin5-Feb-12 8:42
professionalAlbert Holguin5-Feb-12 8:42 
GeneralRe: TCP/IP problems Pin
ForNow5-Feb-12 12:14
ForNow5-Feb-12 12:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.