Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to setup a timer?

Answers were Sorted based on User's Feedback



How to setup a timer?..

Answer / arvin

The SetTimer function creates a timer with the specified
time-out value.

Syntax
UINT_PTR SetTimer(
HWND hWnd,
UINT_PTR nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc
);
Example:
SetTimer(1, 200, 0);

Is This Answer Correct ?    2 Yes 0 No

How to setup a timer?..

Answer / kamal

SetTimer(1, 10000, NULL);

Enter this function OnInitDialog()

Is This Answer Correct ?    0 Yes 0 No

How to setup a timer?..

Answer / kishore kumar naik p

We can set the timer using SetTimer method, this method
posts WM_TIMER message after every 'X' seconds configured,
The message will be placed in the message queue of the
application and application takes little time to take the
message and process so these are not accurate.

For accurate timers we have Multimedia timers,

To start a multimedia timer we can use

MMRESULT timeSetEvent(
UINT uDelay,
UINT uResolution,
LPTIMECALLBACK lpTimeProc,
DWORD_PTR dwUser,
UINT fuEvent
);

To kill a multimedia timer
MMRESULT timeKillEvent(
UINT uTimerID
);

Refers MSDN for more

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MFC Interview Questions

1)To Remove WS_MINIMIZEBOX in a Frame ?

1 Answers  


Psychic Window Technique

2 Answers   E Logic, Wild Net,


What is stack size in win32 program?

1 Answers   HCL,


what is the use of CWinApp class?

3 Answers   Mphasis,


If application hangs while SendMessage is waiting for the result, how you handle it?

2 Answers  


What function is used to retrieve the currently selected index in a list box?

2 Answers  


If i derive a new class from CObject what are the basic features my derived wil get ?

4 Answers   Microsoft,


how does the UIThread and worker thread communicates and handle events

2 Answers   HCL,


is it possible to display a window .without using windowclass

1 Answers   E Logic,


What is model and modeless dialog box ? Give some examples?

2 Answers   Mphasis,


Have you ever used win32 APIs ?

4 Answers   Microsoft,


1) Enable or disable a Cancel button at run time?

1 Answers   HCL,


Categories