Hi,

Need help to know, how to diaplay a count down timer in the dialog box using MFC.
and when the timer ends the dialog should colse........

Please provide suggestion......

Recommended Answers

All 4 Replies

use an OnTimer() event handler. See SetTime() and KillTimer()

use an OnTimer() event handler. See SetTime() and KillTimer()

can you please tell me how to use it in a dialog box.......

my application dials a number on clicking dial button and on clicking the "end call" button it will stop the call. i want to capture the time between this two clicks and generate bill with respect to time.........

how can i achieve this.......

also if the user's balance is low or about to end, the call[ie the dialog box] should be closed, ie the "end call" button should be automatically activated.....

please help.......

>>can you please tell me how to use it in a dialog box.......
Not here -- that topic will fill a book.

When the call button is clicked the program should get the currnt system date/time and save it in a variable. When the end call is clicked the program gets the current date/time and save it in another variable. Then just get the difference and your problem is solved. I would just use the time functions in time.h

>>also if the user's balance is low or about to end, the call[ie the dialog box] should be closed, ie the "end call" button should be automatically activated

You might want to consider using an OnTimer() event handler for that

>>can you please tell me how to use it in a dialog box.......
Not here -- that topic will fill a book.

When the call button is clicked the program should get the currnt system date/time and save it in a variable. When the end call is clicked the program gets the current date/time and save it in another variable. Then just get the difference and your problem is solved. I would just use the time functions in time.h

>>also if the user's balance is low or about to end, the call[ie the dialog box] should be closed, ie the "end call" button should be automatically activated

You might want to consider using an OnTimer() event handler for that

is used OnTimer() and time function.it's working.....

thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.