🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Running an external application like a modal form

#12637
From: Damian Vilchis
Date: Mon, 24 Nov 2003 22:49
48 lines
2589 bytes
Remy Lebeau (TeamB) wrote:
> "Damian Vilchis" <damian@ininin.com.mx> wrote in message
> news:3fc24ad9$1@newsgroups.borland.com...
> 
> 
>>The problem with both aproaches is that not only the paint message
>>is processed. If I use ProcessMessages, any message is processed
>>and this eliminate the Modal behavior.
> 
> 
> If you use Update(), the form will be repainted without processing other
> messages.

Yes, but once finished the external application the messages in the 
queue are processed.

> 
> 
>>Update work a little better, only repaint the form, but the
>>messages are enqueued
> 
> 
> No, they are not.  TWinControl::Update() calls the Win32 API function
> UpdateWindow(), which sends the WM_PAINT message directly to the window
> procedure without using the message queue at all.  Thus the form is
> repainted immediately.
> 

Again the same, the form is painted inmediately no problem, but if the 
user pressed a button in the calling form while the external application 
is runningon this message is processed when the application is finished 
and not discarted like in the modal case.

> 
>>tha calling application must be able to paint itself but not anymore.
> 
> 
> That is what Update() is for.
> 
> 
> Gambit
> 

I solve the problem simply disabling the calling form before the 
external application is launched, and enabling once the application is 
finished.

Thanks.
Technical Details
Message-ID: <3fc28a38@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: <3fbea2f3$1@newsgroups.borland.com> <3fbea647$1@newsgroups.borland.com> <3fc24ad9$1@newsgroups.borland.com> <3fc25df4$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,2cd4433069f943cd
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-24 15:09:34 PST
Date: Mon, 24 Nov 2003 16:49:01 -0600
From: Damian Vilchis <damian@ininin.com.mx>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031030
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Running an external application like a modal form
References: <3fbea2f3$1@newsgroups.borland.com> <3fbea647$1@newsgroups.borland.com> <3fc24ad9$1@newsgroups.borland.com> <3fc25df4$1@newsgroups.borland.com>
In-Reply-To: <3fc25df4$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 148.235.169.11
Message-ID: <3fc28a38@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1069713976 148.235.169.11 (24 Nov 2003 14:46:16 -0700)
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