🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Handle of MessageBox

#3571
From: Dennis Jones
Date: Wed, 31 May 2006 00:50
23 lines
1668 bytes
Hi,

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.

Thanks,

- Dennis
Technical Details
Message-ID: <447ce85d$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

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,21899a732622f4b0,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Dennis Jones" <nospam@nospam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Handle of MessageBox
Date: Tue, 30 May 2006 17:50:39 -0700
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 71.245.109.58
Message-ID: <447ce85d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1149036637 71.245.109.58 (30 May 2006 17:50:37 -0700)
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