CreateWindowEx_() DestroyWindow_()

Everything else that doesn't fall into one of the other PB categories.
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

CreateWindowEx_() DestroyWindow_()

Post by Sparkie »

If I use hGadget = CreateWindowEx_() to create my own gadget/control/window, do I need to use DestroyWindow_(hGadget) at program end/quit?
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

Ok, I think found my answer. As long as the gadget\window\control I create using CreateWindowEx() is a child of my WindowID(), the work is done for me when #PB_Event_CloseWindow occurs. :)
msdn wrote:DestroyWindow Function
If the specified window is a parent or owner window, DestroyWindow automatically destroys the associated child or owned windows when it destroys the parent or owner window. The function first destroys child or owned windows, and then it destroys the parent or owner window.
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Post Reply