carlosn
asked on
Drawing an Oscilloscope (flickerfree & fast)
I want to display an oscilloscope in a window. This oscilloscope would have a fixed grid, some fixed text, and the moving signal display.
Ideally the grid and text should be displayed BEHIND the signal, but this is not critical.
The grid and text should be flicker-free.
Finally the scope should not take too much processor time. It is displaying the result of a fairly intensive calculation process, and I don't want to spend half my time just painting.
What is the best way to implement something like this in MFC?
Carlos
Ideally the grid and text should be displayed BEHIND the signal, but this is not critical.
The grid and text should be flicker-free.
Finally the scope should not take too much processor time. It is displaying the result of a fairly intensive calculation process, and I don't want to spend half my time just painting.
What is the best way to implement something like this in MFC?
Carlos
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, I'll have to check the XOR idea.
I have started using some of the memory DC, and found that the BitBlt was incredibly slow. Is this normal? Copying over a bitmap thats about 300x200 pixels, it was taking about 6% of the softwares time (according to the profiler). Each BitBlt ran for about 2 ms, and the window is getting updated every 50 ms or so.
I have started using some of the memory DC, and found that the BitBlt was incredibly slow. Is this normal? Copying over a bitmap thats about 300x200 pixels, it was taking about 6% of the softwares time (according to the profiler). Each BitBlt ran for about 2 ms, and the window is getting updated every 50 ms or so.
Yes, BitBlt is slow. DrawDibDraw was created to be faster.
Good luck.
Phillip
Good luck.
Phillip
Also (and possibly best) you may want to choose your signal wisely, if you use the XOR pen to draw your data, then you can just erase the signal with another XOR drawing. Then you won't have to redraw the entire bitmap at all. Just XOR on and XOR off the signal.
Phillip