🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Application ProcessMessages

#4146
From: Remy Lebeau (TeamB)
Date: Thu, 09 Mar 2006 21:37
38 lines
1971 bytes
"saravanan" <asaravanan@ften.com> wrote in message
news:441004a5$1@newsgroups.borland.com...

> In my main thread, there are some operations which takes more
> time. Because of this, screen paint was not happening.

Then you should probably move those operations into their own thread as
well.

> void Function () {
>
>   Operation 1 --> Take 1 sec to execute
>   Application->ProcessMessage () ;    //..This line is added to force the
> screen paint

If all you want to do is update the GUI display, without actually processing
user actions yet, then you can use the form's Update() method instead.

> My Problem is Application->ProcessMessage should serve only the
> Painting operation and not the Data Posted from Seperate Thread.

Then use Update() instead of ProcessMessages().

    void __fastcall TForm1::Function()
    {
        Operation1();
        Update();

        Operation2();
        Update();

        Operation3();
        Update();
    }


Gambit
Technical Details
Message-ID: <44109fc6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <440ee66c@newsgroups.borland.com> <440f21ca$1@newsgroups.borland.com> <441004a5$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bb5b2339083fb22b
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <440ee66c@newsgroups.borland.com> <440f21ca$1@newsgroups.borland.com> <441004a5$1@newsgroups.borland.com>
Subject: Re: Application ProcessMessages
Date: Thu, 9 Mar 2006 13:37:09 -0800
Lines: 40
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <44109fc6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1141940166 68.69.17.41 (9 Mar 2006 13:36:06 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail