Click here to Skip to main content
15,894,740 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: system restarting by itself Pin
David Crow10-Jul-06 3:15
David Crow10-Jul-06 3:15 
AnswerRe: system restarting by itself Pin
Tara1410-Jul-06 3:21
Tara1410-Jul-06 3:21 
GeneralRe: system restarting by itself Pin
earl10-Jul-06 4:44
earl10-Jul-06 4:44 
GeneralRe: system restarting by itself Pin
Tara1410-Jul-06 4:57
Tara1410-Jul-06 4:57 
QuestionAbout CMutex [modified] Pin
Diglu10-Jul-06 0:01
Diglu10-Jul-06 0:01 
AnswerRe: About CMutex Pin
ovidiucucu10-Jul-06 0:15
ovidiucucu10-Jul-06 0:15 
GeneralRe: About CMutex Pin
Diglu10-Jul-06 0:20
Diglu10-Jul-06 0:20 
QuestionCreate timer for 1sec and more Pin
thathvamsi9-Jul-06 23:19
thathvamsi9-Jul-06 23:19 
Hey all,
In my application, I need to turn on the timer once the Pc sends a packet to the serial device. the serial device should respond immediately to teh PC's request. The Pc should get response from the serial device within "m" secs. the Pc will wait for response from serial device and check for the timer. if elapsed, will resend the packet again.

in brief,

On_send(wparam,lparam)
{
//packet sent to serial device
//timer has to be triggered on here
}

On_rx(wparam,lparam)
{
//checks for packet received
//if no packet received from serial device, then
{
//check for timer
while(timer has elapsed)
{
//resend the packet to MPU
post_message(WM_RESEND,null)
}
}
}

On_resend(wparam,lparam)
{
//send same packet to PC
here, I have to restart the timer again to see if the
serial device responded within particular time as in On_rx.
}


this is the idea i have in mind. but i dont know how to implement. Can I use WM_TIMER...? I know there are various timers like multimedai timers, etc., But dont know which one suits my need as I am still in the learning curve of MFC.

I would appreciate if anyone can help me with this.
Thanks in advance.




AnswerRe: Create timer for 1sec and more Pin
ThatsAlok10-Jul-06 0:18
ThatsAlok10-Jul-06 0:18 
AnswerRe: Create timer for 1sec and more Pin
David Crow10-Jul-06 3:17
David Crow10-Jul-06 3:17 
QuestionDll Subsystem query Pin
ComplexLifeForm9-Jul-06 23:14
ComplexLifeForm9-Jul-06 23:14 
AnswerRe: Dll Subsystem query Pin
Dave Kerr10-Jul-06 0:12
Dave Kerr10-Jul-06 0:12 
Questionwebsites Pin
ashish dogra9-Jul-06 23:09
ashish dogra9-Jul-06 23:09 
AnswerRe: websites Pin
ThatsAlok9-Jul-06 23:19
ThatsAlok9-Jul-06 23:19 
GeneralRe: websites Pin
ashish dogra9-Jul-06 23:23
ashish dogra9-Jul-06 23:23 
GeneralRe: websites Pin
ThatsAlok10-Jul-06 0:17
ThatsAlok10-Jul-06 0:17 
GeneralRe: websites Pin
ashish dogra10-Jul-06 0:25
ashish dogra10-Jul-06 0:25 
QuestionTooltip text Pin
sir_moreno9-Jul-06 23:00
sir_moreno9-Jul-06 23:00 
AnswerRe: Tooltip text Pin
FarPointer9-Jul-06 23:26
FarPointer9-Jul-06 23:26 
GeneralRe: Tooltip text Pin
sir_moreno9-Jul-06 23:57
sir_moreno9-Jul-06 23:57 
Questionreversing string function Pin
progman9-Jul-06 22:48
progman9-Jul-06 22:48 
AnswerRe: reversing string function Pin
Naveen9-Jul-06 22:55
Naveen9-Jul-06 22:55 
GeneralRe: reversing string function Pin
progman9-Jul-06 23:02
progman9-Jul-06 23:02 
GeneralRe: reversing string function [modified] Pin
Naveen9-Jul-06 23:10
Naveen9-Jul-06 23:10 
GeneralRe: reversing string function Pin
Rory Solley9-Jul-06 23:32
Rory Solley9-Jul-06 23:32 

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.