A thing to note: 'to measure' is the act of determining the value of a property. 'to mess (something up)' is somewhat synonym to 'meddle' or 'create chaos'. I'll assume that by 'messure' you mean the former, not the latter.
I created owner drawn listbox and I used double buffering
for preventing flickering because I have a lot of data ,
the problem is that its don't present all the items and ,
whan I scroll it down and up its erases part of the items,
the code is:
I am writing an application that perform image acquisition frome a camera.
The image aqcuisition is done by a DLL Supplied by the camera manufactorer.
Basicaly im initializing the DLL and then i start capture,in my application i defened a function that is called by the DLL every captured frame,this "OnFrameCapturedHandler" function gets the frame as the parameter.
Then i perform some calculation on the frame and i display it on the GUI.
But the problem is that the grabbing is faster then my calculation so what happens is that a new frame comes in while the previous is still processed.So what i need is some way to block or to make "OnFrameCapturedHandler" not to do anything while previos frame is Processed.
I tried to put boolean at the begining of "OnFrameCapturedHandler" and set it to false while still processing and at the end set it to true.
And before entering the "OnFrameCapturedHandler" check it.but it freezes my app.
I just want to point out that if, as you say "the problem is that the grabbing is faster then my calculation", then you are destined to lose frames. Threads and frame queues may help with the management of the arriving data but it is basic queueing, if your per-frame processing time exceeds the frame inter-arrival time, you will have problems. This basic tenet was masterfully demonstrated by the late Lucile Ball in the famous "chocolate candy factory" skit. Processing/interarrival mismatch[^]
Once you get the synchronization of the threads and queueing out of the way, you either need to make your processing faster or decide on how you choose which incoming frames to discard.
I will like to create a motion detection application that displays/ previews a moving image on a windows machine when power is applied to a camera and removes the preview when the power is removed from the camera.
I was thinking a motion detection application would be best as when power is off there should be no motion, while the opposite applies when power is applied and the camera is receiving signal.
The app will need to poll the video feed all the time to ensure when power is applied the image is displayed very quickly.
Where do I start and can someone provide some advice.
I insert flash player activex on the MFC application and write the code
but file is not playing . also I want to display the controls of flash player activex .
how can I do this