Click here to Skip to main content
15,888,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DeleteFile Hook Pin
elchupathingy6-Aug-10 4:38
elchupathingy6-Aug-10 4:38 
QuestionHow to add combo box items to TreeListControl. Pin
Sakhalean3-Aug-10 21:37
Sakhalean3-Aug-10 21:37 
AnswerRe: How to add combo box items to TreeListControl. Pin
Niklas L4-Aug-10 0:00
Niklas L4-Aug-10 0:00 
GeneralRe: How to add combo box items to TreeListControl. Pin
Sakhalean4-Aug-10 0:44
Sakhalean4-Aug-10 0:44 
GeneralRe: How to add combo box items to TreeListControl. Pin
Iain Clarke, Warrior Programmer4-Aug-10 10:05
Iain Clarke, Warrior Programmer4-Aug-10 10:05 
QuestionNeed application working for timer basis Pin
Game-point3-Aug-10 20:29
Game-point3-Aug-10 20:29 
AnswerRe: Need application working for timer basis Pin
CPallini3-Aug-10 21:02
mveCPallini3-Aug-10 21:02 
AnswerRe: Need application working for timer basis Pin
bleedingfingers3-Aug-10 21:10
bleedingfingers3-Aug-10 21:10 
I will give you only some leads and not spoon feed you. What you have to do is something like this.

HANDLE hEvent;

long FunctionThread(void*)
{
	while(true)
	{
		WaitForSingleObject(hEvent, NULL);
		// do your job
                // break out of this loop as necessary
	}
        return 0;
}

long TimerCheckThread(void*)
{
	while(true)
	{
		if(timeout)
		{
			SetEvent(hEvent);
		}
                // break out of this loop as necessary
	}
        return 0;
}

void Setup()
{
	// create the event
	hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);

	// start both the threads using CreateThread(...)
}


Event is something that allows synchronization of threads. WaitForSingleObject(...) function waits until the event is set and won't consume valuable CPU cycles. So, that job is going to start only after the time out has occurred.

Read more about the terms that you encounter here and after you understand, you can easily build on this example.
...byte till it megahertz...

QuestionBluetooth Block Pin
tanu misra3-Aug-10 19:42
tanu misra3-Aug-10 19:42 
QuestionRe: Bluetooth Block Pin
CPallini3-Aug-10 21:12
mveCPallini3-Aug-10 21:12 
AnswerRe: Bluetooth Block Pin
tanu misra3-Aug-10 23:51
tanu misra3-Aug-10 23:51 
GeneralRe: Bluetooth Block Pin
Cedric Moonen4-Aug-10 0:53
Cedric Moonen4-Aug-10 0:53 
GeneralRe: Bluetooth Block Pin
tanu misra4-Aug-10 1:19
tanu misra4-Aug-10 1:19 
GeneralRe: Bluetooth Block Pin
Cedric Moonen4-Aug-10 1:40
Cedric Moonen4-Aug-10 1:40 
GeneralRe: Bluetooth Block Pin
tanu misra4-Aug-10 19:18
tanu misra4-Aug-10 19:18 
QuestionRe: Bluetooth Block Pin
David Crow4-Aug-10 3:07
David Crow4-Aug-10 3:07 
AnswerRe: Bluetooth Block Pin
tanu misra6-Aug-10 0:55
tanu misra6-Aug-10 0:55 
GeneralRe: Bluetooth Block Pin
David Crow6-Aug-10 2:53
David Crow6-Aug-10 2:53 
GeneralRe: Bluetooth Block Pin
tanu misra7-Aug-10 0:57
tanu misra7-Aug-10 0:57 
GeneralRe: Bluetooth Block Pin
David Crow7-Aug-10 7:25
David Crow7-Aug-10 7:25 
GeneralRe: Bluetooth Block Pin
tanu misra17-Aug-10 22:56
tanu misra17-Aug-10 22:56 
QuestionRe: Bluetooth Block Pin
David Crow18-Aug-10 2:07
David Crow18-Aug-10 2:07 
AnswerRe: Bluetooth Block Pin
tanu misra18-Aug-10 18:55
tanu misra18-Aug-10 18:55 
QuestionRe: Bluetooth Block Pin
David Crow19-Aug-10 2:09
David Crow19-Aug-10 2:09 
AnswerRe: Bluetooth Block Pin
tanu misra19-Aug-10 18:26
tanu misra19-Aug-10 18: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.