GDI+ and GDI calls is a great technique for increasing performance as long
as you stick with the right memory, IE screen memory.
Some GDI operations don't work well on double buffered controls because many
of the advantages of GDI come from hardware acceleration that is impossible
on in-memory bitmaps.
When the GDI drivers attempt to work on certain memory they are unable to do
the operation with hardware and revert to software for the task.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Marcin Rzeznicki" <ma**************@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Hello,
Do you think it is legitimate practice to mix GDI+ and GDI calls (via
Get/ReleaseHDC()) in paint event of a control? I've heard there is
possibility of performance loss while "locking" Graphics object which
is done as a side-effect to GetHDC() call - could you confirm? Another
question that comes to my mind when planning mentioned operation is: if
the control painted on uses double-buffering style, will GDI calls make
use of "back buffer" or will they mess it somehow eg drawing directly
to screen bypassing back buffer (I think it depends on what is returned
via GetHDC() - hndle to back buffer context or just control window
context)? Thank you in advance for your answers.