Click here to Skip to main content
15,896,154 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Compile Error Help - I'm stuck Pin
gmhanna13-Apr-06 3:11
gmhanna13-Apr-06 3:11 
QuestionUnused member functions Pin
mkuhac12-Apr-06 14:45
mkuhac12-Apr-06 14:45 
QuestionProject Settings Pin
ankita patel12-Apr-06 14:42
ankita patel12-Apr-06 14:42 
AnswerRe: Project Settings Pin
Michael Dunn12-Apr-06 15:16
sitebuilderMichael Dunn12-Apr-06 15:16 
GeneralRe: Project Settings Pin
ankita patel12-Apr-06 15:29
ankita patel12-Apr-06 15:29 
QuestionVideo Files Pin
Raz71612-Apr-06 14:10
Raz71612-Apr-06 14:10 
AnswerRe: Video Files Pin
Raz71613-Apr-06 11:57
Raz71613-Apr-06 11:57 
QuestionImplementing a Timer Pin
murali197312-Apr-06 14:04
murali197312-Apr-06 14:04 
Hello,

I need to implement a timer in my application. Upon receipt of a message, the application needs to wait for a specified period of time informing the end user and then continue. So I implemented the timer with setTimer() and processes the WM_TIMER message, updating the dialog for the user. When the speicified timer interval has expired, I issue killTimer(with Id) and close the dialog.

To test this from my CNotifyTimerApp::InitInstance(), I send a message like this:

AfxGetMainWnd()->SendMessage(...);

// Just to see when this gets displayed
MessageBox("After sending message");

to the mainframe class which will do as mentioned above. It seems that after SendMessage(...), immediately the MessageBox appears.

This is not what I want. When the dialog is displayed to the user with the timer counting down information, I don't want the applicatino to continue untill the time has expired. From the above, I think that SendMessage returns immediately and is executing the next instruction!

Can someone help me with this? Is there a better way of achieving this?

Thankyou,
Murali




Murali
AnswerRe: Implementing a Timer Pin
BlackDice12-Apr-06 14:09
BlackDice12-Apr-06 14:09 
GeneralRe: Implementing a Timer Pin
Stephen Hewitt12-Apr-06 14:21
Stephen Hewitt12-Apr-06 14:21 
GeneralRe: Implementing a Timer Pin
murali197313-Apr-06 6:09
murali197313-Apr-06 6:09 
GeneralRe: Implementing a Timer Pin
Stephen Hewitt13-Apr-06 18:36
Stephen Hewitt13-Apr-06 18:36 
AnswerRe: Implementing a Timer Pin
Michael Dunn12-Apr-06 15:18
sitebuilderMichael Dunn12-Apr-06 15:18 
GeneralRe: Implementing a Timer Pin
murali197313-Apr-06 6:06
murali197313-Apr-06 6:06 
QuestionCopy window contents to repaint Pin
chasetoys12-Apr-06 14:02
chasetoys12-Apr-06 14:02 
QuestionFtprenamefile error 12003!!! Pin
Ting Li Che12-Apr-06 13:51
Ting Li Che12-Apr-06 13:51 
AnswerRe: Ftprenamefile error 12003!!! Pin
Michael Dunn12-Apr-06 15:20
sitebuilderMichael Dunn12-Apr-06 15:20 
QuestionC++ Mouse Event Listener Pin
jonesap512-Apr-06 12:43
jonesap512-Apr-06 12:43 
AnswerRe: C++ Mouse Event Listener Pin
bob1697212-Apr-06 14:22
bob1697212-Apr-06 14:22 
QuestionHow to convert CString to char Pin
masnu12-Apr-06 11:53
masnu12-Apr-06 11:53 
AnswerRe: How to convert CString to char Pin
James R. Twine12-Apr-06 14:43
James R. Twine12-Apr-06 14:43 
AnswerRe: How to convert CString to char Pin
Hamid_RT12-Apr-06 20:44
Hamid_RT12-Apr-06 20:44 
Questionplotting in Visual Studio C++ Pin
ilda lapi12-Apr-06 11:14
ilda lapi12-Apr-06 11:14 
AnswerRe: plotting in Visual Studio C++ Pin
masnu12-Apr-06 12:06
masnu12-Apr-06 12:06 
AnswerRe: plotting in Visual Studio C++ Pin
El Corazon12-Apr-06 13:28
El Corazon12-Apr-06 13:28 

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.