Re: Multithreading Component
yeomanly@gmail.com wrote:
Hello,
Our team is developing a GUI Application. This application will display
multiple images at a time. These images can be rotated, zoomed and do
various post processing tools. One of the requirement is to play back
multiple images at a time.
I have few queries here,
I developed a Windows control library Component in VC.NET. This
component is used in C# application to display images and play back.
Multiple instance of the component is created in the C# and used. When
I play back any of the component what happens is the control doesnt
come out from it. I do display each frame in loop. So at a time only
one instance of the component play back. But I need to display multiple
components simultaneously. What should I do it make it play
independently.
You have to eliminate the loop so each component will return quickly to
share the CPU. The easiest way is probably to have each component start
its own timer if it needs to schedule future painting. Multithreading
is not a good option - all GUI elements should be in the main thread so
they can intercommunicate easily.
--
Scott McPhillips [VC++ MVP]