🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: OnTerminate Problems in TThread

#11523
From: BillT
Date: Fri, 06 Feb 2004 18:47
47 lines
2677 bytes
Thank you for your response. In my all nigth adventure with this, I assumed 
that to be the case. I now do a SendNotifyMessage and use a custom WindowProc 
to get myself out of the mess. The code is real messy at the moment but it 
works!. I will do a cleanp over the next week.

Is this the group that deals with backgrounds on forms? I am trying to put a 
colorful (company logo etc.) on my form. From what I can figure it would 
require the buttons & labels to have a transparent background. I'm using BCB4 
and I know 6 is better at many things but I'm a private contractor and 
upgrading is a luxury. I would love to know how to do that. 

Bill



In article <40228cc5$1@newsgroups.borland.com>, 
gambit47.no.spam@no.spam.yahoo.com says...
>
>
>"BillT" <billtouch_no_spam@att.net> wrote in message
>news:4021d3fe@newsgroups.borland.com...
>
>> The second thread runs but when it finishes, it does not
>> transfer control to its OnTerminate Routine.
>
>Are you still inside the first thread's OnTerminate event handler at the
>time?  Or in another event handler of the main thread?  OnTerminate uses
>Synchronize() internally, thus the main thread needs to process new messages
>periodically (or in the case of BCB6, call the CheckSynchronize() function)
>in order for Synchronize() to work correctly.
>
>
>> void __fastcall TForm1::PackageThreadDone(TObject * /*Sender*/)
>> {
>>    delete PackageLoad;
>>    Loader1();
>> }
>
>Do not delete the thread while you are still inside its event handler.  If
>you must auto-delete the thread when it terminated, then simply set its
>FreeOnTerminate property to true when you create the thread instance
>instead.  The thread will free itself after OnTerminate has returned.
>
>
>Gambit
>
>
Technical Details
Message-ID: <4023e13a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4021d3fe@newsgroups.borland.com> <40228cc5$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,25162141e75feeb5
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-02-06 11:10:16 PST
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: OnTerminate Problems in TThread
From: billtouch_no_spam@att.net (BillT)
X-Newsreader: WinVN 0.99.9 (Released Version) (x86 32bit)
References: <4021d3fe@newsgroups.borland.com> <40228cc5$1@newsgroups.borland.com>
MIME-Version: 1.0
Content-Type: Text/Plain; charset=US-ASCII
NNTP-Posting-Host: 216.195.28.253
Message-ID: <4023e13a@newsgroups.borland.com>
Date: 6 Feb 2004 10:47:22 -0800
X-Trace: newsgroups.borland.com 1076093242 216.195.28.253 (6 Feb 2004 10:47:22 -0800)
Lines: 48
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail