Link to home
Start Free TrialLog in
Avatar of ndb
ndb

asked on

SetTimer Function call ...

Is there someone out there who can give me an example of the CListBox.SetTimer(), CListBox.OnTimer() and CListBox.KillTimer()?
Avatar of jrmcg
jrmcg

What exactly are you trying to do?  The CListBox does not have a timer function of its own that I am aware of.  I can help you write a Timer if you will tell me what you want to do with it... with respect to the CListBox.

J.R.
These are members of CWnd, the base class of CListBox (and a lot of other classes too, such as CView).

Look for examples of CWnd::SetTimer
Typically, the timer is set within the controlling window's message loop and not within the control itself.  Then on the OnTimer, you will update the list box accordingly.  Otherwise, you'll will have to override the CListBox with a class of your own.

Phillip
Avatar of ndb

ASKER

I want to create some kind of buffer. When a user presses a key then a stringbuffer is created related to a timer. That buffer stays active for 1sec and is destroyed again unless the user pressed a key within that 1sec. The the timer is restarted again.
ASKER CERTIFIED SOLUTION
Avatar of psdavis
psdavis
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial