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

Destroy Button

0 views
Skip to first unread message

Xarky

unread,
Jun 4, 2004, 6:18:01 AM6/4/04
to
Hi,

I would like to destroy a button knowing only the Control ID of the
button (I hope its not a stupid question). Is it possible and how?


Thanks for your help.

Niels Dybdahl

unread,
Jun 8, 2004, 4:08:02 AM6/8/04
to
> I would like to destroy a button knowing only the Control ID of the
> button (I hope its not a stupid question). Is it possible and how?

There exists a API function to retrieve the windows handle from the Control
ID and the dialog handle. I do not remember its name.

Niels Dybdahl


Xarky

unread,
Jun 10, 2004, 1:59:12 AM6/10/04
to
hi,


Problem solved, I stored the buttons handle in array.

Thanks for your help

"Niels Dybdahl" <n...@fjern.detteesko-graphics.com> wrote in message news:<40c573e3$0$174$edfa...@dtext02.news.tele.dk>...

Jussi Jumppanen

unread,
Jun 24, 2004, 10:01:15 AM6/24/04
to
Xarky wrote:

> I would like to destroy a button knowing only the Control ID of the
> button (I hope its not a stupid question). Is it possible and how?

If you know the parent hwnd of the button use GetDlgItem and call
DestroyWindow for the hwnd returned. If you don't know the parent
hwnd then you may have to resort to EnumChildWindows to find the
hwnd of the button.

Jussi Jumppanen
Author of: Zeus for Windows (New version 3.93 out now)
"The C/C++, Cobol, Java, HTML, Python, PHP, Perl programmer's editor"
Home Page: http://www.zeusedit.com

0 new messages