Tuesday, April 9, 2013

Draw to TBitmap fail !

[Reference] http://qc.embarcadero.com/wc/qcmain.aspx?d=43018


At multi-thread program. The canvas handle of the Bitmap may be freed during the drawing procedure. So, lock the canvas before the drawing operation. And free after the drawing.
Lock the canvas may reduce the performance. But sometimes you have to do this.

Canvas->Lock();

drawing....

Canvas0->Unlock();

No comments:

Post a Comment

phpMyAdmin 無法存取 MariaDB 10 的解決方法

 [Reference]  https://www.qnap.com/zh-tw/how-to/faq/article/%E7%82%BA%E4%BB%80%E9%BA%BC%E7%84%A1%E6%B3%95%E5%9C%A8-phpmyadmin-%E5%AD%98%E5%8...