anxyl
August 22, 2007, 14:20:33
I have been trying to write texts in a timer onto the live video. It works fine for a while but after some from five to 20 minutes (or even longer, it varies) the function of drawText() stops work, and as a result, there is no any further overlay updating on the live video. The other part of the program seems continuing without being affected.
Another problem which may be related is that if I put the beginPaint(), and endPaint() in the front and back of the text drawing functions (I know from the document it is not necessary), the program crash after a similar random period, with an Assertion failed error message window saying: “Expression: dc!=0 && “You didn’t call beginPaint(). So the HDC returned is 0.”. However in fact beginPaint() was called each time. In this case, the updating problem did not happen (or not happens because it chash).
I would be very grateful if any could help.
Another problem which may be related is that if I put the beginPaint(), and endPaint() in the front and back of the text drawing functions (I know from the document it is not necessary), the program crash after a similar random period, with an Assertion failed error message window saying: “Expression: dc!=0 && “You didn’t call beginPaint(). So the HDC returned is 0.”. However in fact beginPaint() was called each time. In this case, the updating problem did not happen (or not happens because it chash).
I would be very grateful if any could help.