🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Modifying the TOpenDialog or TSaveDialog

#2536
From: Remy Lebeau (TeamB)
Date: Mon, 12 Feb 2007 03:01
26 lines
2053 bytes
"Dan Mayo" <do_not_spam_dmayo2@netzero.com> wrote in message
news:45cfa974$1@newsgroups.borland.com...

> Ok, button is added, the onclick event is assigned to the button;
but
> the onclick event never is fired when the button is clicked?  Why
not?

Because the dialog window is not a VCL window.  It is not designed to
forward the messages that are needed for triggering the button's event
handlers.  You will have to use Get/SetWindowLong() to subclass the
dialog's window in order to handle the WM_COMMAND/BN_CLICKED
notification directly.  Otherwise, put the TButton onto a TPanel or
other container, and then put that onto the dialog window.

> What is the best way to modify the file name editbox when the
> TOpenDialog is already visible?

You already know how to obtain the HWND of the dialog window.  Once
you have that, you can do whatever you want with it and its child
windows.  All you need is their HWNDs as well, which you can get using
FindWindow/Ex() or GetDlgItem().


Gambit
Technical Details
Message-ID: <45cfd88c$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45c9f090$1@newsgroups.borland.com> <45caed68@newsgroups.borland.com> <45cca151$1@newsgroups.borland.com> <45ccc478$1@newsgroups.borland.com> <45cd016e$1@newsgroups.borland.com> <45cfa974$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,991e7cc92168a8f1
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: <45c9f090$1@newsgroups.borland.com> <45caed68@newsgroups.borland.com> <45cca151$1@newsgroups.borland.com> <45ccc478$1@newsgroups.borland.com> <45cd016e$1@newsgroups.borland.com> <45cfa974$1@newsgroups.borland.com>
Subject: Re: Modifying the TOpenDialog or TSaveDialog
Date: Sun, 11 Feb 2007 19:01:05 -0800
Lines: 28
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: 75.83.34.171
Message-ID: <45cfd88c$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1171249292 75.83.34.171 (11 Feb 2007 19:01:32 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail