-
January 17th, 2013, 03:16 PM
#1
A question regarding DestroyWindow
If a window is created by calling Create, the function DestroyWindow must be called to destroyed it at the end? Thanks.
-
January 17th, 2013, 03:22 PM
#2
Re: A question regarding DestroyWindow
What does msdn tell you? Does DestroyWindow docs reference CreateWindow or CreateWindowEx? What does the remarks section in each api tell you.
I mean I could answer this question directly but I wonder why you ask it since the info is available so easily in msdn online.
-
January 17th, 2013, 04:27 PM
#3
Re: A question regarding DestroyWindow
Originally Posted by Arjay
What does msdn tell you? Does DestroyWindow docs reference CreateWindow or CreateWindowEx? What does the remarks section in each api tell you.
I mean I could answer this question directly but I wonder why you ask it since the info is available so easily in msdn online.
Yes, DestroyWindow docs does reference CreateWindow and CreateWindowEx. Okey, I may assume if a window is created by calling CreateWindow, then it must be destroyed by calling DestroyWindow. But what if I don't call DestroyWindow to destroy window created by the function Create? Programming is not about memorize some rules and programming is about knowing everything in and out instead.
-
January 17th, 2013, 04:52 PM
#4
Re: A question regarding DestroyWindow
Originally Posted by LarryChen
Yes, DestroyWindow docs does reference CreateWindow and CreateWindowEx. Okey, I may assume if a window is created by calling CreateWindow, then it must be destroyed by calling DestroyWindow. But what if I don't call DestroyWindow to destroy window created by the function Create? Programming is not about memorize some rules and programming is about knowing everything in and out instead.
Programming is about trying things and see how they work, reading documentation and about working independently. If you've been at it for 8 or more years, it's about giving back to the forum rather than using it as your personal replacement for figuring things out on your own. Just once Larry, just once, why don't you answer somebody's question for a change.
-
January 17th, 2013, 07:32 PM
#5
Re: A question regarding DestroyWindow
Originally Posted by LarryChen
But what if I don't call DestroyWindow to destroy window created by the function Create? Programming is not about memorize some rules and programming is about knowing everything in and out instead.
Do you know what a window handle is? Do you know if Windows has a max limit for the number of opened windows handles? Do you know what DestroyWindow does? CloseHandle?
Sure, programming isn't about memorizing some rules - it is about understanding. So go do some research. Read up on Petzold and Richter and spend some time giving yourself a sufficient background so you don't need to ask the never ending obvious questions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|