Re: CWinThread and Memory Leaks.
From: jim_OLP (jimh_at_mcg.net)
Date: 01/14/05
- Next message: Jon: "Send message to the window in another UI thread"
- Previous message: jim_OLP: "Re: CWinThread and Memory Leaks."
- In reply to: Doug Harrison [MVP]: "Re: CWinThread and Memory Leaks."
- Next in thread: Doug Harrison [MVP]: "Re: CWinThread and Memory Leaks."
- Reply: Doug Harrison [MVP]: "Re: CWinThread and Memory Leaks."
- Messages sorted by: [ date ] [ thread ]
Date: 13 Jan 2005 18:28:08 -0800
Thanks for the reply, I appreciate your expertise and hope you can get
me out of this deadlock.
No inter-thread SendMessage whatsoever. This is all stuff I've done
successfully in the past, at 6.0, and I can't seem to make it work
now.
My main thread creates a CWinThread-derrived class with AfxBeginThread.
That thread creates a modeless dialog in InitInistance. Things are fine
until the main thread enters a loop iinside a message handler (the
reason for the progress thread. The loop has a generous Sleep() in it
so it's not hogging the CPU. After that, the modeless dialog in the
'progress' thread is dead. Spy++ shows it never gets any messages. If I
break into the debugger I see my progress thread blocked at a
DefWndProc call to m_pfnSuper. And it's total fog to me after that
point, as I don't know what m_pfnSuper represents. I suspect MFC is
trying to pass unhandled messages to the main window, thinking it's the
parent of my dialog, but that makes no real sense. When I create the
modeless dialog I don't give it a parent.
- Next message: Jon: "Send message to the window in another UI thread"
- Previous message: jim_OLP: "Re: CWinThread and Memory Leaks."
- In reply to: Doug Harrison [MVP]: "Re: CWinThread and Memory Leaks."
- Next in thread: Doug Harrison [MVP]: "Re: CWinThread and Memory Leaks."
- Reply: Doug Harrison [MVP]: "Re: CWinThread and Memory Leaks."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|