Click here to Skip to main content
15,918,003 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: WM_RELEASEDCAPTURE(tab) Pin
James R. Twine27-Feb-07 2:49
James R. Twine27-Feb-07 2:49 
GeneralRe: WM_RELEASEDCAPTURE(tab) Pin
RaviPK27-Feb-07 17:46
RaviPK27-Feb-07 17:46 
QuestionDatatypes - Urgent Pin
janadhana27-Feb-07 1:42
janadhana27-Feb-07 1:42 
JokeRe: Datatypes - Urgent Pin
James R. Twine27-Feb-07 2:45
James R. Twine27-Feb-07 2:45 
QuestionThread Question Pin
Programm3r27-Feb-07 1:01
Programm3r27-Feb-07 1:01 
AnswerRe: Thread Question Pin
James R. Twine27-Feb-07 1:16
James R. Twine27-Feb-07 1:16 
GeneralRe: Thread Question Pin
Programm3r27-Feb-07 1:25
Programm3r27-Feb-07 1:25 
AnswerRe: Thread Question Pin
Newbie0027-Feb-07 1:19
Newbie0027-Feb-07 1:19 
Programm3r wrote:
Is it possible to pause the thread or put it in a standby mode


Yes it is. You can use events:

//The CreateEvent function creates a named or unnamed event <br />
//object. <br />
<br />
HANDLE CreateEvent(<br />
<br />
    LPSECURITY_ATTRIBUTES lpEventAttributes,	// pointer to security attributes  <br />
    BOOL bManualReset,	// flag for manual-reset event <br />
    BOOL bInitialState,	// flag for initial state <br />
    LPCTSTR lpName 	// pointer to event-object name  <br />
   );<br />
<br />
//The SetEvent function sets the state of the specified event object to <br />
//signaled. <br />
<br />
BOOL SetEvent(<br />
<br />
    HANDLE hEvent 	// handle of event object <br />
   );<br />
<br />
//The ResetEvent function sets the state of the specified event object <br />
//to nonsignaled. <br />
<br />
BOOL ResetEvent(<br />
<br />
    HANDLE hEvent 	// handle of event object <br />
   );	<br />
 <br />
//The WaitForSingleObject function returns when one of the following <br />
//occurs:<br />
<br />
//·	The specified object is in the signaled state.<br />
//·	The time-out interval elapses.<br />
<br />
 <br />
<br />
DWORD WaitForSingleObject(<br />
<br />
    HANDLE hHandle,	// handle of object to wait for <br />
    DWORD dwMilliseconds 	// time-out interval in milliseconds  <br />
   );


You can also use these functions:
//The SuspendThread function suspends the specified thread. <br />
<br />
DWORD SuspendThread(<br />
<br />
    HANDLE hThread 	// handle to the thread <br />
   );<br />
<br />
/*The ResumeThread function decrements a thread's suspend count. When the suspend count is decremented to zero, the execution of the thread is resumed. */<br />
<br />
DWORD ResumeThread(<br />
<br />
    HANDLE hThread 	// identifies thread to restart <br />
   );	<br />


Also Creating critical sections suspends threads when they are trying to use same datas as other threads which are using it in the same time.
GeneralRe: Thread Question Pin
Programm3r27-Feb-07 1:27
Programm3r27-Feb-07 1:27 
AnswerRe: Thread Question Pin
Nibu babu thomas27-Feb-07 3:37
Nibu babu thomas27-Feb-07 3:37 
GeneralRe: Strange Font bolding Pin
super_ttd27-Feb-07 0:09
super_ttd27-Feb-07 0:09 
GeneralRe: Strange Font bolding Pin
Nibu babu thomas27-Feb-07 0:12
Nibu babu thomas27-Feb-07 0:12 
GeneralRe: Strange Font bolding Pin
super_ttd27-Feb-07 21:55
super_ttd27-Feb-07 21:55 
GeneralRe: Strange Font bolding Pin
Nibu babu thomas28-Feb-07 17:24
Nibu babu thomas28-Feb-07 17:24 
GeneralRe: Strange Font bolding Pin
super_ttd28-Feb-07 21:30
super_ttd28-Feb-07 21:30 
GeneralRe: Strange Font bolding Pin
Nibu babu thomas28-Feb-07 21:36
Nibu babu thomas28-Feb-07 21:36 
Questioni want to know when a button is clicked but it was "DISABLED" Pin
Ing.Raiz8227-Feb-07 0:08
Ing.Raiz8227-Feb-07 0:08 
AnswerRe: i want to know when a button is clicked but it was "DISABLED" Pin
prasad_som27-Feb-07 0:15
prasad_som27-Feb-07 0:15 
AnswerRe: i want to know when a button is clicked but it was "DISABLED" Pin
James R. Twine27-Feb-07 1:14
James R. Twine27-Feb-07 1:14 
AnswerRe: i want to know when a button is clicked but it was "DISABLED" Pin
Ing.Raiz8227-Feb-07 4:01
Ing.Raiz8227-Feb-07 4:01 
QuestionDestroy View Pin
baerten27-Feb-07 0:04
baerten27-Feb-07 0:04 
AnswerRe: Destroy View Pin
prasad_som27-Feb-07 1:38
prasad_som27-Feb-07 1:38 
GeneralRe: Destroy View Pin
baerten27-Feb-07 1:51
baerten27-Feb-07 1:51 
JokeDamn Pin
baerten27-Feb-07 4:02
baerten27-Feb-07 4:02 
GeneralRe: Damn Pin
prasad_som27-Feb-07 4:16
prasad_som27-Feb-07 4:16 

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.