by joshbu [MSFT] » Apr 13, 2004 @ 6:16pm
I took a look in the message queing code. Each message que in CE has a an event associated with it that gets signaled when a new message has been entered into the que. GetMessage's primary difference from PeekMessage is that it calls WaitForSingleObject on that event.
All of the low power magic is happening in the WaitForSingleObject routine.
So, you should be able to reap low power goodness with either loop, so long as when you use PeekMessage, you still give some cycles back to the OS in some way: a Wait* or a Sleep.
Now, I'm afraid that I can't answer why the touch driver performance would improve in that case. Perhaps it is multithreaded and giving up a few cycles allows the touch worker threads to do work in a more timely fasion? <shrugs>
joshbu AT microsoft dot-you-know-where
Windows CE Software Design Engineer
“This posting is provided “AS IS” with no warranties, and confers no rights.”