Click here to Skip to main content
15,913,115 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Do I need to delete a CArray Pin
Code4Food13-Nov-02 12:27
Code4Food13-Nov-02 12:27 
GeneralRe: Do I need to delete a CArray Pin
Christian Graus13-Nov-02 12:43
protectorChristian Graus13-Nov-02 12:43 
GeneralRe: Do I need to delete a CArray Pin
Code4Food13-Nov-02 18:05
Code4Food13-Nov-02 18:05 
GeneralRe: Do I need to delete a CArray Pin
Christian Graus13-Nov-02 18:17
protectorChristian Graus13-Nov-02 18:17 
QuestionHow to use the UTILITY PROJECT in VC++ Pin
youssef13-Nov-02 11:12
youssef13-Nov-02 11:12 
GeneralImage list Pin
electronicman_x13-Nov-02 10:00
electronicman_x13-Nov-02 10:00 
GeneralRe: Image list Pin
Joaquín M López Muñoz13-Nov-02 10:19
Joaquín M López Muñoz13-Nov-02 10:19 
GeneralUI thread basics.. Pin
RobJones13-Nov-02 9:46
RobJones13-Nov-02 9:46 
In a UI thread..

I was wondering if I am doing this correctly... In run() I call a function.. at the end of that function I call AfxEndThread(0,TRUE); Is this what I am supposed to do to close the thread from with-in it's self? If I do it this way how can I tell if ExitInstance() is being called?

BOOL CMyThread::InitInstance()
{
	// Init stuff..
	return TRUE;
}

int CMyThread::Run() 
{
	SomeFunction();
	
	return CWinThread::Run();
}

void CMyThread::SomeFunction()
{
	//Do some things

	AfxEndThread(0,TRUE);
}

int CMyThread::ExitInstance()
{
	// Clean up etc..

	return CWinThread::ExitInstance();
}


Thanks!


Rob
GeneralRe: UI thread basics.. Pin
Joaquín M López Muñoz13-Nov-02 10:06
Joaquín M López Muñoz13-Nov-02 10:06 
GeneralRe: UI thread basics.. Pin
RobJones13-Nov-02 10:09
RobJones13-Nov-02 10:09 
GeneralRe: UI thread basics.. Pin
Joaquín M López Muñoz13-Nov-02 10:13
Joaquín M López Muñoz13-Nov-02 10:13 
GeneralRe: UI thread basics.. Pin
RobJones13-Nov-02 10:23
RobJones13-Nov-02 10:23 
GeneralRe: UI thread basics.. Pin
Joaquín M López Muñoz13-Nov-02 10:27
Joaquín M López Muñoz13-Nov-02 10:27 
GeneralRe: UI thread basics.. Pin
RobJones13-Nov-02 10:28
RobJones13-Nov-02 10:28 
GeneralRe: UI thread basics.. Pin
Joaquín M López Muñoz13-Nov-02 10:46
Joaquín M López Muñoz13-Nov-02 10:46 
QuestionHow to open a URL on a different virtual desktop? Pin
Larry Antram13-Nov-02 9:43
Larry Antram13-Nov-02 9:43 
AnswerRe: How to open a URL on a different virtual desktop? Pin
RobJones13-Nov-02 9:58
RobJones13-Nov-02 9:58 
Generalradio button handlers: recursion when using arrow key to switch buttons Pin
David Klotz13-Nov-02 9:13
David Klotz13-Nov-02 9:13 
GeneralRe: radio button handlers: recursion when using arrow key to switch buttons Pin
Alvaro Mendez13-Nov-02 9:51
Alvaro Mendez13-Nov-02 9:51 
GeneralRe: radio button handlers: recursion when using arrow key to switch buttons Pin
Alvaro Mendez13-Nov-02 10:06
Alvaro Mendez13-Nov-02 10:06 
GeneralRe: radio button handlers: recursion when using arrow key to switch buttons Pin
David Klotz13-Nov-02 11:58
David Klotz13-Nov-02 11:58 
GeneralDynamically resizing a static control Pin
Anonymous13-Nov-02 7:38
Anonymous13-Nov-02 7:38 
GeneralRe: Dynamically resizing a static control Pin
Ravi Bhavnani13-Nov-02 8:11
professionalRavi Bhavnani13-Nov-02 8:11 
GeneralToo many property pages. Pin
DanYELL13-Nov-02 7:21
DanYELL13-Nov-02 7:21 
GeneralRe: Too many property pages. Pin
Daniel Turini13-Nov-02 7:51
Daniel Turini13-Nov-02 7:51 

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.