Re: CWinThread and Memory Leaks.
From: jim_OLP (jimh_at_mcg.net)
Date: 01/14/05
- Next message: jim_OLP: "Re: CWinThread and Memory Leaks."
- Previous message: Doug Harrison [MVP]: "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 19:14:29 -0800
[sigh...] As is so often the case I'm dealing with a large legacy
project and can't move the time-consuming operation into its own
thread. It has to access data in the main thread, so the progress
window has to be in the 'other' thread.
As you point out "ISTR that if you don't specify the main window for
a secondary UI thread, MFC sets it to the primary thread's main
window." I think that's what's happening and I think for some reason,
unprocessed messages are going to the main window in the main thread.
Maybe if I set m_pMainWnd in the 'progress' thread...
When I've done this in the past, the second thread has created a
full-blown MFC doc/frame/view lashup which probably satisfied all the
hidden requirements. This time I'm just creating a single modeless
dialog.
- Next message: jim_OLP: "Re: CWinThread and Memory Leaks."
- Previous message: Doug Harrison [MVP]: "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
|