Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pressing "hidden" buttons

0 views
Skip to first unread message

Lars Schweer

unread,
Aug 12, 1998, 3:00:00 AM8/12/98
to
Hello!

I have to write a program that controls another program which doesn't
support COM. The only was to control this programm seems to send messages
directly to the application windows.
If I use Spy to get the handle of a button or textbox, i can't find them.
They seem to be hidden and only the dialog window is shown by Spy.
Is there a way to send a message, or another way, that makes the program
think that the user has pressed the button?

"Hdden" Buttons can also be seen in the Winword options dialog. The okay and
cancel button are not shown in Spy.

Maybe someone can help me out before i get mad!

Lars

TTT

unread,
Aug 12, 1998, 3:00:00 AM8/12/98
to
To simulate pressing of a button in a dialog, you need to send to the dialog
a WM_COMMAND message with a BN_CLICKED notification and the control id of
the button.

TTT

Dirk Djuga

unread,
Aug 13, 1998, 3:00:00 AM8/13/98
to
Lars Schweer wrote in message <6qt1bs$ooc$1...@news.LF.net>...

>Hello!
>
>I have to write a program that controls another program which doesn't
>support COM. The only was to control this programm seems to send messages
>directly to the application windows.
>If I use Spy to get the handle of a button or textbox, i can't find them.
>They seem to be hidden and only the dialog window is shown by Spy.
>Is there a way to send a message, or another way, that makes the program
>think that the user has pressed the button?


The buttons may belong to a different windoe that is either the parent or a
child of the dialog you see. Explore the hierarchy with spy++.

cU
--
Dirk Djuga mailto:di...@solaris.stuttgart.netsurf.de
http://djuga.home.ml.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retriever 2.0 is out: http://retriever.home.ml.org

Shareware image viewer, thumbnailer & database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


0 new messages