🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Click a button on another application

#16533
From: Remy Lebeau (TeamB)
Date: Mon, 05 May 2003 16:35
17 lines
1745 bytes
"Timothy H. Buchman" <tbuchmanPLEASE(at sign)REMOVEcitycenter.org> wrote in
message news:3eb64fa0$1@newsgroups.borland.com...

> Here's a fine comprehensive answer by Gambit:

Not quite as conprehensive as needed - it doesn't explain how to obtain the
HWND for the button in the first place.  You have to do that first before
you can do anything else with it.  Use FindWindow() to get the HWND for the
main window of the application, and then either EnumChildWindows() or
GetDlgItem() to get the HWND of the particular button on that window.  In
the case of GetDlgItem(), however, you need to know the button's ID first,
which you can obtain beforehand using spy tools likw Borland's WinSight or
Microsoft's Spy++ utilities, and then hard-code that ID into your code.


Gambit
Technical Details
Message-ID: <3eb6927d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3eb633b0$1@newsgroups.borland.com> <3eb64fa0$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,d9604e51f8dfe8bf
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-05 09:44:53 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3eb633b0$1@newsgroups.borland.com> <3eb64fa0$1@newsgroups.borland.com>
Subject: Re: Click a button on another application
Date: Mon, 5 May 2003 09:35:43 -0700
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3eb6927d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1052152445 207.175.226.26 (5 May 2003 09:34:05 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail