🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Handle of MessageBox

#3572
From: Ed Mulroy
Date: Wed, 31 May 2006 01:07
28 lines
2107 bytes
You are going at it the hard way.  Make a window that you use as a message 
box.  Make the button on the form open that window instead of a regular 
message box.  You can then supply a function which closes the window.

.  Ed

> Dennis Jones wrote in message
> news:447ce85d$1@newsgroups.borland.com...
>
> I need the ability to programmatically close a message box.  However, I 
> only
> want to close it if it was opened as a result of calling MessageBox or
> Application->MessageBox from a specific form (which is also open).  To do
> so, it would seem that I need to know a couple of things:
>
> 1) If a message box is currently open
> 2) If the message box was opened in the context of a specific form
> 3) The handle of the message box
>
> Is it possible to obtain these 3 pieces of information?
>
> This requirement comes from the need to close a form programatically, 
> which
> includes closing any forms opened by (owned by) that form, which also
> includes (potentially) message boxes.  I have been able to handle closing
> TForm and TCommonDialog descendants, but I'm stuck on message boxes.
>
> Any suggestions would be welcome.
Technical Details
Message-ID: <447cec43$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.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: <447ce85d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,21899a732622f4b0
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Ed Mulroy" <dont_email_me@bitbuc.ket>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <447ce85d$1@newsgroups.borland.com>
Subject: Re: Handle of MessageBox
Date: Tue, 30 May 2006 21:07:14 -0400
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 69.242.35.97
Message-ID: <447cec43$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1149037635 69.242.35.97 (30 May 2006 18:07:15 -0700)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.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