Here is a great example: http://www.codeguru.com/cpp/misc/misc/g ... c15709__1/
Make sure to check out the BufferedPaintExample_demo.zip run it and resize the window, flickery text, then choose buffered in the menu and resize again, no flickering.
Now I do know that freak redid the drawing in PureBasic, but what I'm really asking here is to use the Buffered API features on Vista and Window 7, on anything older than Vista the native routines would be used.
One cool function in this API is BufferedPaintClear "This function accesses the buffer bits directly and is therefore faster than calling a GDI function to erase the buffer." There is also BufferedPaintSetAlpha and so on.
Buffered drawing supports DIB which is what PB use as default I believe?
There are also GetBufferedPaintTargetRect and a few other Getxxxx.
Another cool thing is that BeginBufferedPaint takes a BP_PAINTPARAMS Structure which lets you specify:
BPPF_ERASE "Initialize the buffer to ARGB = {0, 0, 0, 0} during BeginBufferedPaint. This erases the previous contents of the buffer."
and a pointer to BLENDFUNCTION structure which let to specify how the buffer is blended with the DC (for example the window) when you do EndBufferedPaint
I have no idea if text drawing can be sped up or not using this.
And I have not done any speed tests comparing Buffered API with PureBasic's built in, but I'm assuming similar (with potential for hardware acceleration maybe?)
If anyone feel bored enough to do speeds tests please do so
