Archived

This topic is now archived and is closed to further replies.

DestroyWindow() Post-mortem

This topic is 5654 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Then what exactly does an HWND refer to? When I call CreateWindow, I assume it creates a window and sets the HWND to refer to that window. So does the HWND continue to point to the window even after it has been destroyed?

Share this post


Link to post
Share on other sites
HWND, and other handles like it, are like pointers. They''re 32-bit numbers used by Windows to reference certain types of objects. The fact that you have one, and it has a number in it, doesn''t necessarily mean that the thing it refers to is at all valid.

The final member function of a window to be called, by the way, when the window is destroyed, is OnNcDestroy, not DestroyWindow.

-fel

Share this post


Link to post
Share on other sites