Article View: borland.public.cppbuilder.nativeapi
Article #17484Re: Lock Canvas all the time, is that good?
From: Phuoc Can HUA
Date: Mon, 10 Mar 2003 23:44
Date: Mon, 10 Mar 2003 23:44
27 lines
2142 bytes
2142 bytes
"Oliver Rutsch" <nospam@sympatec.com> wrote in message news:1047285223.9813@post.sympatec.net... > > No! If you call the Paint() method from your thread then you have at > least two threads calling it. The other thread is your VCL main thread > which always calls Paint() if it has to be repainted (notice the > problems you got when moving the window around!). It is the response to > the WM_PAINT message from Windows. The Canvas I'm locking are those non-visible ones which are used to to 'draw' (copy) an image on a temporary Canvas (locked as well) and at the end copy it to a visible Canvas (not locked). > That won't work (see the reason above). Critical sections are not that > time critical as you may thing. Every device driver have to use some and > they are really fast. If that's the case then I can experiment with lock's until it works :-) Anyway, it's working so far. Thanks for your valuable advice with the locks. I was so desperate when I couldn't find any programming mistake of concurrent access in my own program. Phuoc Can HUA -- _/\__/\__/\__/\__/\__/\_ www.huaonline.com My Homepage is my Castle
Technical Details
Message-ID:
<3e6d24b9$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e6c1d18@newsgroups.borland.com> <1047285223.9813@post.sympatec.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,3d8952475d18559d,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-12 16:58:13 PST From: "Phuoc Can HUA" <home+a+t+huaonline.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e6c1d18@newsgroups.borland.com> <1047285223.9813@post.sympatec.net> Subject: Re: Lock Canvas all the time, is that good? Date: Tue, 11 Mar 2003 10:44:41 +1100 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 210.9.89.210 Message-ID: <3e6d24b9$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1047340217 210.9.89.210 (10 Mar 2003 15:50:17 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail