0

I'm working on a Windows Mobile 6.5 application that has a dialog box that displays input from a camera and has a button to save a snapshot of the stream. The camera API recommends calling the function that updates the view of stream when the application is idle, via the Windows Message Loop, but doesn't get any more specific than that. After much Googling, I still can't find anything helpful in terms of actually implementing something like this.

Does anyone know how this might be achieved?

NobodyNothing
  • 155
  • 3
  • 13

1 Answers1

1

You'll have to implement a message loop, not using the conventional GetMessage which blocks until a message exists in the thread's message queue[1], but rather using PeekMessage, which returns false if no message exists[1].

If it returns false, then you do your idle processing. Note that you should divide your idle processing in small enough chunks so that the message loop doesn't cause unresponsiveness to your app.

This is also a classical alternative to threading on 1 cpu or 1 core.

[1] or should be synthesized (painting or timers)

Johann Gerell
  • 24,991
  • 10
  • 72
  • 122