473,770 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cleaning up NativeWindows

Do NativeWindows get destroyed when the app shuts down?

While my app is running I can Spy++ and see my NativeWindow handle.
After app shutdown it's no longer there.

But this is confusing because if I Spy++ on the messages, and do a
DestroyHandle, I see a WM_DESTROY, but do not see this message when
the app shuts down. I presume the window has indeed been destroyed,
because Spy++ doesn't pick it up.

Should I be calling DestroyHandle, or is the framework cleaning up the
NativeWindow for me?
Nov 16 '05 #1
1 2111
Mikey,

The framework is cleaning it up for you when it exits. When it exists,
the GC will cause classes that haven't been finalized to be finalized. If
the controls did not have Dispose called on them (releasing the windows
handle), it will be taken care of here.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Mikey" <bo******@hotma il.com> wrote in message
news:62******** *************** ***@posting.goo gle.com...
Do NativeWindows get destroyed when the app shuts down?

While my app is running I can Spy++ and see my NativeWindow handle.
After app shutdown it's no longer there.

But this is confusing because if I Spy++ on the messages, and do a
DestroyHandle, I see a WM_DESTROY, but do not see this message when
the app shuts down. I presume the window has indeed been destroyed,
because Spy++ doesn't pick it up.

Should I be calling DestroyHandle, or is the framework cleaning up the
NativeWindow for me?

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1722
by: StinkFinger | last post by:
Hello all, After enabling sessions for my website I have approx. 785 files in my sessiondata folder. Now, I know what these are, however, I don't know when/how is the best way to clean them (besides running a weekly delete batch file). Once the users leaves and closes the browser, the session is essential dead, right ? So, why would I need to keep these files around ? I looked in PHP.INI but I could not find any "cleaning" settings to...
2
1252
by: Ellen K. | last post by:
What tools has everyone used for cleaning name and address data (including identifying not-immediately-obvious duplicates) in connection with a CRM project or the Customer dimension of a data warehouse? What did you like/dislike about the tool you used? How customizable was the tool you used?
1
1535
by: Matej Cepl | last post by:
Hi, can anybody help me with the cleaning of really messy HTML from the news site into really clean XHTML, which I would like to then analyze with some qualitative analysis (probably exporting to plain ASCII in meantime, but not necessarily). I can do some little cleaning by hand, but when there some hundreds of webpages, I hoped that I could create some XSL stylesheet for conversion.
4
2017
by: Jaans | last post by:
I have a problem that relates to running "cleanup" code when an application is forcibly ended using the "End Process" of "Task Manager" (Please note that this is very different from "End Task" since end task sends a message to the application, requesting it to close) My real problem is that our application makes entries into a database when the application starts, and then corresponding entries when the application closes ("cleanup")....
6
2374
by: sheffdog | last post by:
Hello, I often find myself cleaning up strings like the following: setAttr ".ftn" -type "string" /assets/chars/ /boya/geo/textures/lod1/ppbhat.tga"; Using regular expressions, the best I can do so far is using the re.sub command but it still takes two lines. Can I do this in one line? Or should I be approaching this differently? All I want to end up with is
3
2296
by: Pierre Saint-Jacques | last post by:
DB2 V8.2 has a new envir. var. DB2_USE_ALTERNATE_PAGE_CLEANING=YES The docs. mention that this will make DB2 ignore chngpgs_thresh and use softmax to even the rate of writing out of the bp's. What agent process then takes over. On a workload of 10000 trans./min., I get over 9000 bp's writes out of my snapshot. However, LSAN Gap Cleaners, Thereshold Cleansers and Victim Page Cleaners are all = 0
13
2352
by: jadionne | last post by:
I have a new instalation that I am ironing out the wrinkles in. In the process I have had a few crashes and now my SQLlib\DB2 Dir is full of ..0 and .000 files. What is the best way to clean up this Dir without damaging anything permanatly?
12
9867
by: Santosh | last post by:
Since I just started my new work, I have inherited a MS Access database which has nearly 13000 records in a single table. Now, my mandate is to clean the database and maybe split the table into two. Can anyone please give me some ideas on how to clean duplicated records without going through all the records. Any help or idea will be greatly appreciated? I am not much of a tech whiz but I am quite familiar with databases. I haven't dealt...
0
1206
by: Now You Know | last post by:
Carpet Cleaners Los Angeles Home Carpet Rug Upholstery Cleaning Phone 1 310 925 1720 OR 1-818-386-1022 Local Call California Wide We offer carpet cleaning services such as; Steam Cleaning, Dry Cleaning, Fabric Lounge Suite Cleaning, Leather Lounge Suite Cleaning, Tile & Grout Cleaning, Mattress Cleaning, Wet Carpet / Water Damage Restoration for: offices, homes, restaurants, clubs and hotels http://carpetcleanersorangecounty.blogspot.com/...
0
9619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10260
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9910
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.