Click here to Skip to main content
15,920,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C# Form from Unmanaged C++ Pin
Nemanja Trifunovic8-Feb-05 5:17
Nemanja Trifunovic8-Feb-05 5:17 
QuestionHow to set a color for window Pin
bilas8-Feb-05 3:52
bilas8-Feb-05 3:52 
GeneralCTreeCtrl and dynamic added icons Pin
Uzi Landsmann8-Feb-05 3:38
sussUzi Landsmann8-Feb-05 3:38 
GeneralRe: CTreeCtrl and dynamic added icons Pin
mc.george8-Feb-05 20:33
mc.george8-Feb-05 20:33 
Questionhow to draw line control in .net design time using 2 points ? Pin
Surya Prakash Adari8-Feb-05 3:26
Surya Prakash Adari8-Feb-05 3:26 
GeneralMemory Leaks Pin
sweep1238-Feb-05 3:00
sweep1238-Feb-05 3:00 
GeneralRe: Memory Leaks Pin
Nemanja Trifunovic8-Feb-05 3:36
Nemanja Trifunovic8-Feb-05 3:36 
GeneralRe: Memory Leaks Pin
Blake Miller8-Feb-05 7:18
Blake Miller8-Feb-05 7:18 
In this SPECIFIC case, you are not deleting the CWinThread object that has been returned by your call to AfxBeginThread or otherwise. In many cases, the CWinThread object does not delete itself when the thread terminates, although you can set a member variable so that it will do so.
It is better to detect that the thread has terminated and then delete the CWinThread object from your program's main thread.
If you don't want to bother tracking the object, then
CWinThread::m_bAutoDelete<br />
Specifies whether the CWinThread object should be automatically deleted at thread termination.

set the member variable TRUE after the call to AfxBeginThread, and hopefully the thread does not terminate before you can set the member, otherwise, create the thread suspended, set the member variable, then resume the thread.

AfxBeginThread - dwCreateFlags <br />
Specifies an additional flag that controls the creation of the thread. This flag can contain one of two values: <br />
CREATE_SUSPENDED   Start the thread with a suspend count of one. Use CREATE_SUSPENDED if you want to initialize any member data of the CWinThread object, such as m_bAutoDelete or any members of your derived class, before the thread starts running. Once your initialization is complete, use CWinThread::ResumeThread to start the thread running. The thread will not execute until CWinThread::ResumeThread is called.

QuestionHow to Display 12-Bit TIFF in MFC? Pin
Ajay L D8-Feb-05 1:35
Ajay L D8-Feb-05 1:35 
AnswerRe: How to Display 12-Bit TIFF in MFC? Pin
Iain Clarke, Warrior Programmer8-Feb-05 2:34
Iain Clarke, Warrior Programmer8-Feb-05 2:34 
GeneralRe: How to Display 12-Bit TIFF in MFC? Pin
Ajay L D8-Feb-05 2:43
Ajay L D8-Feb-05 2:43 
GeneralRe: How to Display 12-Bit TIFF in MFC? Pin
Iain Clarke, Warrior Programmer8-Feb-05 7:40
Iain Clarke, Warrior Programmer8-Feb-05 7:40 
GeneralAnimation in MFC Pin
Member 14844968-Feb-05 1:15
Member 14844968-Feb-05 1:15 
GeneralRe: Animation in MFC Pin
BlackDice8-Feb-05 3:24
BlackDice8-Feb-05 3:24 
GeneralRe: Animation in MFC Pin
Ryan Binns8-Feb-05 17:38
Ryan Binns8-Feb-05 17:38 
GeneralRe: Animation in MFC Pin
Member 14844969-Feb-05 20:36
Member 14844969-Feb-05 20:36 
GeneralRe: Animation in MFC Pin
Ryan Binns10-Feb-05 12:37
Ryan Binns10-Feb-05 12:37 
GeneralRe: Animation in MFC Pin
Member 148449610-Feb-05 18:26
Member 148449610-Feb-05 18:26 
GeneralPlease HELP Pin
Rassul Yunussov8-Feb-05 0:39
Rassul Yunussov8-Feb-05 0:39 
GeneralRe: Please HELP Pin
2249178-Feb-05 0:52
2249178-Feb-05 0:52 
GeneralRe: Please HELP Pin
Rassul Yunussov8-Feb-05 1:39
Rassul Yunussov8-Feb-05 1:39 
GeneralRe: Please HELP Pin
2249178-Feb-05 17:03
2249178-Feb-05 17:03 
GeneralRe: Please HELP Pin
Rassul Yunussov8-Feb-05 18:24
Rassul Yunussov8-Feb-05 18:24 
GeneralRe: Please HELP Pin
Rassul Yunussov8-Feb-05 1:42
Rassul Yunussov8-Feb-05 1:42 
GeneralLocale Problem........... Pin
nutkase8-Feb-05 0:03
nutkase8-Feb-05 0:03 

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.