🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Click a button on another application

#16539
From: Dubhglas
Date: Tue, 06 May 2003 09:43
34 lines
2096 bytes
Excellent! It works perfectly!
I used GetDlgItem because I am not very familiar with EnumChildWindows.

Thank you so much for your help!





"Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote in message
news:3eb6927d$1@newsgroups.borland.com...
>
> "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: <3eb783a9@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!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> <3eb6927d$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-06 02:46:48 PST
From: "Dubhglas" <info_remove@pixel-gc.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3eb633b0$1@newsgroups.borland.com> <3eb64fa0$1@newsgroups.borland.com> <3eb6927d$1@newsgroups.borland.com>
Subject: Re: Click a button on another application
Date: Tue, 6 May 2003 11:43:04 +0200
Lines: 36
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: 80.105.70.126
Message-ID: <3eb783a9@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1052214185 80.105.70.126 (6 May 2003 02:43:05 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail