The short answer is "yes, you can". ;) From Arman's reply I guess you didn't think about a UI-thread and a CWinThread derived object from the start and you don't really need a UI-thread. I suggest you create an ordinary worker thread, see here[^] how to do it and avoid common pitfalls. Create a waitable timer with ::CreateWaitableTimer( NULL, FALSE, NULL )[^] inside your worker thread and wait on the timer handle with e.g. ::WaitForMultipleObjects(...). Start the timer with ::SetWaitableTimer(...)[^] and make it periodic.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown