🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2398

Re: Sending WM_PAINT parameters

#2398
From: danzer
Date: Tue, 27 Feb 2007 22:09
25 lines
1664 bytes
poojo hackma wrote:
> My mistake!
> 
> I just found that I should *never* use SendMessage (or PostMessage) with 
> WM_PAINT.
> 
> I found a different way to handle this by using an Invalidate() from within 
> my main thread then calling UpdateWindow(hParent) from my other thread.
> 
> Sorry for taking up your time.
> 
> Don't worry. I'm sure I'll have other stupid questions to ask. 
> 
> 

Using hParent in your "other thread" is not thread-safe.  See Gambit's 
explanation to me.

http://groups.google.com/group/borland.public.cppbuilder.vcl.components.using/browse_thread/thread/10b36291929e5d80/1cdbd4452defe29c?lnk=st&q=&rnum=6&hl=en#1cdbd4452defe29c

or

http://tinyurl.com/2yunb5

Danzer
Technical Details
Message-ID: <45e4ac87@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45e484ea@newsgroups.borland.com> <45e48beb$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4ab09b6139d6c452
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 27 Feb 2007 16:09:12 -0600
From: danzer <.>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Sending WM_PAINT parameters
References: <45e484ea@newsgroups.borland.com> <45e48beb$1@newsgroups.borland.com>
In-Reply-To: <45e48beb$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.96.229.17
Message-ID: <45e4ac87@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1172614279 24.96.229.17 (27 Feb 2007 14:11:19 -0800)
Lines: 25
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail