Article View: borland.public.cppbuilder.nativeapi
Article #4135Re: Application ProcessMessages
From: saravanan
Date: Thu, 09 Mar 2006 10:34
Date: Thu, 09 Mar 2006 10:34
36 lines
1897 bytes
1897 bytes
Hi,
There is a thread in my application which does PostMessage to main
thread as and when new information is available from the server. In my main
thread, there are some operations which takes more time. Because of this,
screen paint was not happening. So i added Application->ProcessMessages.
For Example,
Main Thread :
void Function () {
Operation 1 --> Take 1 sec to execute
Application->ProcessMessage () ; //..This line is added to force the
screen paint
Operation 2--> Take 1 sec to execute
Application->ProcessMessage () ;
Operation 3--> Take 1 sec to execute
Application->ProcessMessage () ;
}
Seperate Thread :
{
while ( OnData () ) {
Post Message to main thread
}
}
My Problem is Application->ProcessMessage should serve only the Painting
operation and not the Data Posted from Seperate Thread. How to do this ?
Regards,
Saravanan A
Technical Details
Message-ID:
<441004a5$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-mailReferences:
<440ee66c@newsgroups.borland.com> <440f21ca$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 Reply-To: "saravanan" <asaravanan@ften.com> From: "saravanan" <asaravanan@ften.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <440ee66c@newsgroups.borland.com> <440f21ca$1@newsgroups.borland.com> Subject: Re: Application ProcessMessages Date: Thu, 9 Mar 2006 02:34:11 -0800 Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 NNTP-Posting-Host: 203.199.207.189 Message-ID: <441004a5$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1141900453 203.199.207.189 (9 Mar 2006 02:34:13 -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