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.
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
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>...
> 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