Click here to Skip to main content
15,889,200 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: example Pin
Hamid_RT10-Jul-06 20:19
Hamid_RT10-Jul-06 20:19 
GeneralRe: example Pin
thathvamsi10-Jul-06 20:31
thathvamsi10-Jul-06 20:31 
GeneralRe: example Pin
ThatsAlok10-Jul-06 22:50
ThatsAlok10-Jul-06 22:50 
QuestionDerived class from abstract class(COleControl in MFC) gave error while allocation memory Pin
dashprasannajit10-Jul-06 17:31
dashprasannajit10-Jul-06 17:31 
AnswerRe: Derived class from abstract class(COleControl in MFC) gave error while allocation memory Pin
Steve Echols10-Jul-06 18:29
Steve Echols10-Jul-06 18:29 
Question[Noob question] Reading a file gives me weird Y chars? Pin
Lord Kixdemp10-Jul-06 16:19
Lord Kixdemp10-Jul-06 16:19 
AnswerRe: [Noob question] Reading a file gives me weird Y chars? Pin
Lord Kixdemp13-Jul-06 11:51
Lord Kixdemp13-Jul-06 11:51 
Questiontimer for 1sec and more Pin
thathvamsi10-Jul-06 15:32
thathvamsi10-Jul-06 15:32 
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.

----
This was my query that I posted yesterday for which I got solutions that WM_TIMER and SetTimer() would be best option.

But doesnt the timer posts the WM_TIMER message to the message queue and we can not be sure when this message will be processed. If that is the case, then how can I use this for my application.?

any help?
AnswerRe: timer for 1sec and more Pin
Jun Du10-Jul-06 16:09
Jun Du10-Jul-06 16:09 
GeneralRe: timer for 1sec and more Pin
thathvamsi10-Jul-06 16:57
thathvamsi10-Jul-06 16:57 
GeneralRe: timer for 1sec and more Pin
ThatsAlok10-Jul-06 19:12
ThatsAlok10-Jul-06 19:12 
GeneralRe: timer for 1sec and more Pin
thathvamsi10-Jul-06 20:20
thathvamsi10-Jul-06 20:20 
GeneralRe: timer for 1sec and more Pin
ThatsAlok10-Jul-06 22:48
ThatsAlok10-Jul-06 22:48 
GeneralRe: timer for 1sec and more Pin
Jun Du11-Jul-06 3:31
Jun Du11-Jul-06 3:31 
Questionabout window message Pin
HOW WHAT10-Jul-06 15:20
HOW WHAT10-Jul-06 15:20 
AnswerRe: about window message Pin
Andy Moore10-Jul-06 16:36
Andy Moore10-Jul-06 16:36 
AnswerRe: about window message Pin
Steve Echols10-Jul-06 18:11
Steve Echols10-Jul-06 18:11 
Questioncan somebody show me a sourcecode about a game called "PACMAN"writing in MFC??HELP Pin
boilerroom10-Jul-06 15:07
boilerroom10-Jul-06 15:07 
AnswerRe: can somebody show me a sourcecode about a game called "PACMAN"writing in MFC??HELP Pin
ThatsAlok10-Jul-06 19:15
ThatsAlok10-Jul-06 19:15 
GeneralRe: can somebody show me a sourcecode about a game called "PACMAN"writing in MFC??HELP Pin
Taka Muraoka10-Jul-06 20:30
Taka Muraoka10-Jul-06 20:30 
JokeRe: can somebody show me a sourcecode about a game called "PACMAN"writing in MFC??HELP Pin
ThatsAlok10-Jul-06 22:49
ThatsAlok10-Jul-06 22:49 
GeneralRe: can somebody show me a sourcecode about a game called "PACMAN"writing in MFC??HELP Pin
boilerroom11-Jul-06 15:13
boilerroom11-Jul-06 15:13 
QuestionReaders and Writers Problem Pin
Fidel_1810-Jul-06 13:53
Fidel_1810-Jul-06 13:53 
AnswerRe: Readers and Writers Problem Pin
ThatsAlok10-Jul-06 19:16
ThatsAlok10-Jul-06 19:16 
GeneralRe: Readers and Writers Problem Pin
Fidel_1810-Jul-06 20:26
Fidel_1810-Jul-06 20: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.