Jump to content
  • Advertisement

Archived

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

doctorsixstring

DestroyWindow() Post-mortem

This topic is 6013 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

Advertisement
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
quote:
Original post by doctorsixstring
So it is impossible to tell the difference between a valid and invalid HWND?



See IsWindow.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!