Click here to Skip to main content
15,891,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VC++ 2003 .NET Pin
Kevin McFarlane25-Mar-05 11:08
Kevin McFarlane25-Mar-05 11:08 
GeneralRe: VC++ 2003 .NET Pin
MMansonFan2529-Mar-05 23:19
MMansonFan2529-Mar-05 23:19 
GeneralUDP datagram, Pls help Pin
Kimdave25-Mar-05 6:46
Kimdave25-Mar-05 6:46 
QuestionAfxBeginThread() ??? Pin
Static(x)25-Mar-05 6:25
Static(x)25-Mar-05 6:25 
AnswerRe: AfxBeginThread() ??? Pin
Michael Dunn25-Mar-05 6:45
sitebuilderMichael Dunn25-Mar-05 6:45 
AnswerRe: AfxBeginThread() ??? Pin
Greg Rodgers25-Mar-05 8:00
Greg Rodgers25-Mar-05 8:00 
GeneralRe: AfxBeginThread() ??? Pin
ddmcr25-Mar-05 10:32
ddmcr25-Mar-05 10:32 
GeneralRe: AfxBeginThread() ??? Pin
Anthony_Yio25-Mar-05 18:41
Anthony_Yio25-Mar-05 18:41 
Your MyThreadProc need to be static.
And you only need to call like

AfxBeginThread(MyThreadProc,(LPVOID)this,0);

E.g

CWinThread* pThread = AfxBeginThread (ThreadFunc, lpVoid, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED);
ASSERT (NULL != pThread);
pThread->m_bAutoDelete = FALSE;
pThread->ResumeThread ();


By the way, make sure you protect the variables that you are accessing in the 'this ' in the thread by using those synchronization classes like CMutex, Interlock functions and etc.



Sonork 100.41263:Anthony_Yio

GeneralNT permissions Pin
RobJones25-Mar-05 6:03
RobJones25-Mar-05 6:03 
GeneralRe: NT permissions Pin
David Crow25-Mar-05 7:29
David Crow25-Mar-05 7:29 
GeneralSerialization Pin
Gagnon Claude25-Mar-05 5:48
Gagnon Claude25-Mar-05 5:48 
GeneralRe: Serialization Pin
Blake Miller25-Mar-05 6:24
Blake Miller25-Mar-05 6:24 
GeneralRe: Serialization Pin
Ravi Bhavnani26-Mar-05 3:10
professionalRavi Bhavnani26-Mar-05 3:10 
GeneralAdding a C++ Inline File to a Visual C++.Net Project Pin
JSadleir25-Mar-05 3:17
JSadleir25-Mar-05 3:17 
GeneralRe: Adding a C++ Inline File to a Visual C++.Net Project Pin
Gary R. Wheeler25-Mar-05 3:47
Gary R. Wheeler25-Mar-05 3:47 
QuestionUnicode sizeof(TCHAR) == 1??? Pin
Dave_25-Mar-05 3:01
Dave_25-Mar-05 3:01 
AnswerRe: Unicode sizeof(TCHAR) == 1??? Pin
David Crow25-Mar-05 3:20
David Crow25-Mar-05 3:20 
AnswerRe: Unicode sizeof(TCHAR) == 1??? Pin
Michael Dunn25-Mar-05 6:26
sitebuilderMichael Dunn25-Mar-05 6:26 
AnswerRe: Unicode sizeof(TCHAR) == 1??? Pin
Blake Miller25-Mar-05 6:29
Blake Miller25-Mar-05 6:29 
GeneralUsing MSFlexGrid and CRecordset Pin
Cybernate25-Mar-05 2:44
Cybernate25-Mar-05 2:44 
GeneralRe: Using MSFlexGrid and CRecordset Pin
David Crow25-Mar-05 5:16
David Crow25-Mar-05 5:16 
GeneralRe: Using MSFlexGrid and CRecordset Pin
Anonymous27-Mar-05 20:00
Anonymous27-Mar-05 20:00 
GeneralRe: Using MSFlexGrid and CRecordset Pin
David Crow28-Mar-05 2:21
David Crow28-Mar-05 2:21 
GeneralTURBU C++ & interrupt numbers Pin
SESCO LIBYA25-Mar-05 2:37
SESCO LIBYA25-Mar-05 2:37 
GeneralRe: TURBU C++ & interrupt numbers Pin
David Crow25-Mar-05 3:26
David Crow25-Mar-05 3:26 

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.