example of a background ticker in c++