Sign in to follow this  
Wavarian

WM_NCDESTROY: Deinitialization

Recommended Posts

Just a quick question, when processing this message (before handing it over to DefWindowProc()), can I safely assume that all child windows still "exist" (but are not visible)? I'm talking about buttons, textboxes and the like. Cheers guys

Share this post


Link to post
Share on other sites
No, by WM_NCDESTROY all child windows are gone, whether
or not you call DestroyWindow(child). Right after WM_DESTROY,
even if you do not call DefWindowProc, Windows destroys all
child windows (unless you destroyed them yourself). Try some
test code in your message proc and see for yourself that no
matter what you do, the destruction order is:

Parent WM_DESTROY
Child WM_DESTROY
Child WM_NCDESTROY (child is officially gone)
Parent WM_NCDESTROY (parent is officially gone)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this