Do you want to close the windows

Closing the Window

When the user closes a window, that action triggers a sequence of window messages.

The user can close an application window by clicking the Close button, or by using a keyboard shortcut such as ALT+F4. Any of these actions causes the window to receive a WM_CLOSE message. The WM_CLOSE message gives you an opportunity to prompt the user before closing the window. If you really do want to close the window, call the DestroyWindow function. Otherwise, simply return zero from the WM_CLOSE message, and the operating system will ignore the message and not destroy the window.

Here is an example of how a program might handle WM_CLOSE.

In this example, the MessageBox function shows a modal dialog that contains OK and Cancel buttons. If the user clicks OK, the program calls DestroyWindow. Otherwise, if the user clicks Cancel, the call to DestroyWindow is skipped, and the window remains open. In either case, return zero to indicate that you handled the message.

If you want to close the window without prompting the user, you could simply call DestroyWindow without the call to MessageBox. However, there is a shortcut in this case. Recall that DefWindowProc executes the default action for any window message. In the case of WM_CLOSE, DefWindowProc automatically calls DestroyWindow. That means if you ignore the WM_CLOSE message in your switch statement, the window is destroyed by default.

When a window is about to be destroyed, it receives a WM_DESTROY message. This message is sent after the window is removed from the screen, but before the destruction occurs (in particular, before any child windows are destroyed).

In your main application window, you will typically respond to WM_DESTROY by calling PostQuitMessage.

We saw in the Window Messages section that PostQuitMessage puts a WM_QUIT message on the message queue, causing the message loop to end.

Here is a flow chart showing the typical way to process WM_CLOSE and WM_DESTROY messages:

How to close your Microsoft account

When you close a Microsoft account, whether because you no longer need it or because it’s a duplicate account, Microsoft wants to make sure of two things:

First, that it’s really you, not someone else trying to close your account.

Second, that you’re not leaving anything important behind that you’re going to need later.

To protect your account from accidentally being closed, we may ask you to prove your identity and intent. For example, if you forgot your account info and had to reset your security info, you must wait 60 days before closing your account.

If you’re sure you want to close your Microsoft account:

Expand the text headings below to learn more about the things you should check first.

Go through the process for how to close your account.

Find out what happens after you close your account.

Before you close your account

Closing a Microsoft account means you won’t be able to use it to sign in to the Microsoft products and services you’ve been using. It also deletes all the services associated with it, including your:

Outlook.com, Hotmail, Live, and MSN email accounts

Xbox Live data and GamerTag

Skype ID and contacts

Office digital perpetual licenses, like Office 2019 Home and Student

Account balance, unused Reward points and Microsoft Certification, including passed exams and associated transcripts.

You can’t delete just one of these services and keep the others.

So, before you close your account, take some time to tie up loose ends, cancel subscriptions, and make sure you don’t leave anything important behind—like files, money from gift cards, or emails. And don’t forget to consider less common services where you use your account. For example, use your remaining Online Commercial Support benefit and for developers, transfer any packages you saved on NuGet.org.

Before deleting your account, you may also want to review these articles: Close your Outlook.com account and Can I use Skype without my Microsoft account?

Select any heading below to learn more about what to do before closing your account:

Spend any remaining money in your Microsoft account by buying digital content from Microsoft Store.

To see how much money is in your Microsoft account, sign in to the Microsoft account website. You should also check your Skype account balance to make sure you don’t have unused credits—after deleting an account, you can’t get those credits back.

If you have subscriptions to services like Microsoft 365, OneDrive, Xbox Live Gold, or an ad-free Outlook.com account, you won’t be able to access them anymore.

If you have subscription or services outside of Microsoft that are associated with this account, we’re unable to cancel those on your behalf.

We strongly recommend that you don’t close this account until you’ve made sure you have no personal or organizational subscriptions or outstanding balances associated with this account.

To cancel most Microsoft subscriptions:

Sign in to Services & subscriptions on the Microsoft account website.

For each paid subscription, go to the subscription you want to cancel and select Payment & billing which appears under the name of the subscription you want to cancel. Select Cancel and follow the remaining instructions.

For any subscription not listed there, go to the service itself (or to the retailer, if you bought the subscription from a retailer) to cancel. For example, if you have a Skype subscription, go to the Skype support page and search for cancellation info.

If the email address associated with your Microsoft account ends in @outlook.com, @hotmail.com, @live.com, or @msn.com, closing the Microsoft account deletes any email stored with it after the 60-day waiting period. During the waiting period, however, your inbox will continue to receive email messages. If the email associated with your Microsoft account is from a different provider like @gmail.com, you can skip this section because your email address won’t be affected.

You can set up an automatic reply to let everyone know that the account is going to be closed, and tell them where to send email to you in the future.

Sign in to your Outlook.com inbox. Select the Options icon, and then select Options.

Under Managing your account, select Sending automated vacation replies and then follow the instructions.

You can also choose Email forwarding under Managing your account to have email you receive sent to a different email address. However, both automatic replies and email forwarding will stop working when your Microsoft account is closed permanently after the 60-day waiting period.

If you’ve used a Microsoft service to store any file or info associated with your closed account, you won’t be able to access it. If there’s anything you want to keep, you must save a copy. For example:

Читайте также:  Как linux узнает пользователей

Email, documents, and photos you’ve stored in Outlook.com, Hotmail, or OneDrive.

Personal data you’ve stored on HealthVault.

Purchasing info at Microsoft.com.

Portfolio data on MSN Money.

Messenger contacts added to Skype. For more info about backing up your contact list, search the Skype support page.

Product keys for any products you’ve purchased with this Microsoft account. (Your installed software will continue to work, but you’ll need the product key if you ever want to reinstall the software, or install it on a new device.)

There is some data you can’t save when you close your Microsoft account. You’ll no longer be able to access music you’ve downloaded using an Xbox Music Pass. (Music and videos you’ve purchased outright will still be playable but can’t be transferred to another device.) Your game progress, Gamerscore, and Gamertag on Xbox Live will be lost.

Devices like Windows phones, computers running Windows 8.1 or later, Surface tablets, and Xbox consoles all work best with a Microsoft account. Some of these devices will still work—to a degree—but you won’t be able to use all their apps and features. Before you close your account, consider setting these devices up with a different Microsoft account so that you can still sign in.

If you manage a child’s Microsoft account, their account stays open when yours is closed. However, after your Microsoft account is closed, your child will be stopped when they try to sign in to Xbox, computers running Windows 8 or later, or Windows phones, until they get consent from another parent account.

If you’ve purchased Online Commercial Support using this Microsoft account, you must use any remaining benefits or they’ll be lost. There are two types of support benefit packages available:

Single incident support. Go to My Support Requests and look at your case history.

If your case is closed, you can close your Microsoft account.

If your case is still open, you should wait until it’s closed before you close your account. If you close your account too soon, you won’t be able to get any potential refunds.

Five-pack incident support. Go to My Professional Support 5-packs and look at your case history.

If you’ve used all the cases, or it the package expired, you can close your Microsoft account.

If you’re eligible for a refund, you must request it before you close your Microsoft account.

If you have any remaining or open cases, you should use the rest of your package before you close your Microsoft account. If you don’t use the package before you close the account, you’ll lose any unused cases and you won’t be able to get a refund.

If you’re a developer and you want to retain control of any packages you own on NuGet.org, be sure to first transfer the ownership of these packages to a different account before deleting the existing account. For more information about how to do this, see How to delete my NuGet.org account.

To close your account

When you’re sure you’re ready:

When you’re prompted to sign in to your account, double-check that it’s the account you want to delete. If not, select Sign in with a different Microsoft account. If you’re having trouble signing in to the account you want to close, see When you can’t sign in to your Microsoft account for help fixing the problem.

Check that the page shows the correct Microsoft account, and then select Next.

Read the list, and select the checkboxes to acknowledge you’ve read each item.

In the Select a reason drop-down list, choose the reason you’re closing the account.

Select Mark account for closure.

A note about Skype accounts

Skype accounts must be associated with a Microsoft account before they can be closed. Follow the previous steps to close an account, and sign in with your Skype account. You are prompted to add an email address to create a Microsoft account. Make sure to use an email address that isn’t already associated with a Microsoft account. Once that is complete, you can continue with the steps to close your account.

You can also remove an account from your device. This doesn’t delete the account, but it does remove email and other content associated with the account from your device.

To remove an email account:

Select the Start button, and then select Settings > Accounts > Email & accounts .

Under Accounts used by email, calendar, and contacts, select the account you want to remove, and then select Manage.

Select Delete account from this device.

Select Delete to confirm.

To remove an account used by apps:

Select the Start button, and then select Settings > Accounts > Email & accounts .

Under Accounts used by other apps, select the account you want to remove, and then select Remove.

Select Yes to confirm.

After you close your account

When you select the Mark account for closure button, we wait 60 days before permanently deleting your Microsoft account in case you change your mind or need to access something on the account before it’s gone forever.

During the waiting period, your account is marked for closure but it still exists. If you want to reopen your Microsoft account, just sign in again within that 60 days. We’ll cancel the account closure, and everything will be just as you left it.

If you’re having issues signing in to your Microsoft account, or forgot or want to change your password, see Microsoft account help.

You can’t use your old account name to create a new account after the account-deletion wait period expires.

14 ways to speed up Windows 10

If you want to optimize Windows 10, take a few minutes to try out these tips to speed up your PC and make it less prone to performance and system issues.

Contributing Editor, Computerworld |

Windows 10 tips

Want Windows 10 to run faster? We’ve got help. In just a few minutes you can try out this baker’s dozen of tips; your machine will be zippier and less prone to performance and system issues.

1. Change your power settings

If you’re using Windows 10’s “Power saver” plan, you’re slowing down your PC. That plan reduces your PC’s performance in order to save energy. (Even desktop PCs typically have a “Power saver” plan.) Changing your power plan from “Power saver” to “High performance” or “Balanced” will give you an instant performance boost.

To do it, launch the Control Panel app, then select Hardware and Sound > Power Options. You’ll typically see two options: “Balanced (recommended)” and “Power saver.» (Depending on your make and model, you might see other plans here as well, including some branded by the manufacturer.) To see the “High performance” setting, click the down arrow by “Show additional plans.”

Change your power settings in Control Panel to give your PC a performance boost. (Click image to enlarge it.)

To change your power setting, simply choose the one you want, then exit Control Panel. “High performance” gives you the most oomph, but uses the most power; “Balanced” finds a happy medium between power use and better performance; and “Power saver” does everything it can to give you as much battery life as possible. Desktop users have no reason to choose “Power saver,” and even laptop users should consider the “Balanced” option when unplugged — and “High performance” when connected to a power source.

2. Disable programs that run on startup

One reason your Windows 10 PC may feel sluggish is that you’ve got too many programs running in the background — programs that you rarely or never use. Stop them from running, and your PC will run more smoothly.

Start by launching the Task Manager: Press Ctrl-Shift-Esc, right-click the lower-right corner of your screen and select Task Manager, or type task manager into the Windows 10 search box and press Enter. If the Task Manager launches as a compact app with no tabs, click “More details” at the bottom of your screen. The Task Manager will then appear in all of its full-tabbed glory. There’s plenty you can do with it, but we’re going to focus only on killing unnecessary programs that run at startup.

Click the Startup tab. You’ll see a list of the programs and services that launch when you start Windows. Included on the list is each program’s name as well as its publisher, whether it’s enabled to run on startup, and its “Startup impact,” which is how much it slows down Windows 10 when the system starts up.

To stop a program or service from launching at startup, right-click it and select “Disable.” This doesn’t disable the program entirely; it only prevents it from launching at startup — you can always run the application after launch. Also, if you later decide you want it to launch at startup, you can just return to this area of the Task Manager, right-click the application and select “Enable.”

You can use the Task Manager to help get information about programs that launch at startup and disable any you don’t need. (Click image to enlarge it.)

Many of the programs and services that run on startup may be familiar to you, like OneDrive or Evernote Clipper. But you may not recognize many of them. (Anyone who immediately knows what “bzbui.exe” is, please raise your hand. No fair Googling it first.)

The Task Manager helps you get information about unfamiliar programs. Right-click an item and select “Properties” for more information about it, including its location on your hard disk, whether it has a digital signature, and other information such as the version number, the file size and the last time it was modified.

You can also right-click the item and select “Open file location.” That opens File Explorer and takes it to the folder where the file is located, which may give you another clue about the program’s purpose.

Finally, and most helpfully, you can select “Search online” after you right-click. Bing will then launch with links to sites with information about the program or service.

If you’re really nervous about one of the listed applications, you can go to a site run by Reason Software called Should I Block It? and search for the file name. You’ll usually find very solid information about the program or service.

Now that you’ve selected all the programs that you want to disable at startup, the next time you restart your computer, the system will be a lot less concerned with unnecessary programs.

3. Use ReadyBoost to speed up disk caching

Windows 10 regularly stores cached data on your hard disk, and then when it needs the data, fetches it from there. The time it takes to fetch cached data depends on the speed of your hard disk. If you have a traditional hard disk instead of an SSD, there’s a trick that can help speed up your cache: use Windows’ ReadyBoost feature. It tells Windows to cache data to a USB flash drive, which is faster than a hard disk. Fetching data from that speedier cache should speed up Windows.

First, plug a USB flash drive into one of your PC’s USB ports. The flash drive needs to support at least USB 2.0, and preferably USB 3 or faster. The faster your flash drive, the more of a speed boost you should see. Also, look for a flash drive that is at least double the size of your PC’s RAM for maximum performance.

After you plug in in the drive, open File Explorer and click “This PC.” Look for the flash drive. It may have an odd name, like UDISK 28X, or something even less-obvious. Right-click it, choose Properties and click the ReadyBoost tab.

Turn on ReadyBoost from this screen to speed up your PC.

You’ll come to a screen that asks whether you want to use the flash drive as a cache and recommends a cache size. Leave the cache size as is or change it if you like. Then select “Dedicate this device to ReadyBoost” and click Apply and then click OK.

(Note that if you see the message, “This device cannot be used for ReadyBoost” when you click the ReadyBoost tab it means your flash drive doesn’t meet ReadyBoost’s minimum performance standards, so you’ll have to insert a new one.)

As you use your computer, ReadyBoost will start filling the cache with files, so you may notice an increase in disk activity. Depending on how much you use your PC, it can take a few days for your cache to fill and offer maximum improved performance. If you don’t see an increase in performance, try a flash disk with more capacity.

4. Shut off Windows tips and tricks

As you use your Windows 10 PC, Windows keeps an eye on what you’re doing and offers tips about things you might want to do with the operating system. In my experience, I’ve rarely if ever found these “tips” helpful. I also don’t like the privacy implications of Windows constantly taking a virtual look over my shoulder.

Windows watching what you’re doing and offering advice can also make your PC run more sluggishly. So if you want to speed things up, tell Windows to stop giving you advice. To do so, click the Start button, select the Settings icon and then go to System > Notifications & actions. Scroll down to the Notifications section and uncheck the box marked “Get tips, tricks, and suggestions as you use Windows.”

Turning off Windows’ suggestions for you should help things run more smoothly (and give you back a measure of privacy). (Click image to enlarge it.)

That’ll do the trick.

5. Stop OneDrive from syncing

Microsoft’s cloud-based OneDrive file storage, built into Windows 10, keeps files synced and up to date on all of your PCs. It’s also a useful backup tool so that if your PC or its hard disk dies, you still have all your files intact, waiting for you to restore them.

Here’s how to turn off OneDrive syncing temporarily, to see if that boosts system performance. (Click image to enlarge it.)

It does this by constantly syncing files between your PC and cloud storage — something that can also slow down your PC. That’s why one way to speed up your PC is to stop the syncing. Before you turn it off permanently, though, you’ll want to check whether it is actually slowing down your PC.

To do so, right-click the OneDrive icon (it looks like a cloud) in the notification area on the right side of the taskbar, then click the More button at the bottom of the screen. From the popup screen that appears, click “Pause syncing” and select either 2 hours, 8 hours or 24 hours, depending upon how long you want it paused. During that time, gauge whether you’re seeing a noticeable speed boost.

If so, and you decide you do indeed want to turn off syncing, right-click the OneDrive icon, and from the popup, select Settings > Account. Click “Unlink this PC,” and then from the screen that appears, click “Unlink account.” When you do that, you’ll still be able to save your files to your local OneDrive folder, but it won’t sync with the cloud.

If you find that OneDrive slows down your PC but prefer to keep using it, you can try to troubleshoot OneDrive problems. For info on how to do that, check out Microsoft’s “Fix OneDrive sync problems” page.

6. Turn off search indexing

Windows 10 indexes your hard disk in the background, allowing you — in theory — to search your PC more quickly than if no indexing were being done. But slower PCs that use indexing can see a performance hit, and you can give them a speed boost by turning off indexing. Even if you have an SSD disk, turning off indexing can improve your speed, because the constant writing to disk that indexing does can eventually slow down SSDs.

To get the maximum benefit in Windows 10, you need to turn indexing off completely. To do so, type services.msc in the Windows 10 search box and press Enter. The Services app appears. Scroll down to either Indexing Service or Windows Search in the list of services. Double-click it, and from the screen that appears, click Stop. Then reboot your machine. Your searches may be slightly slower, although you may not notice the difference. But you should get an overall performance boost.

Here’s how to turn off Windows 10 indexing. (Click image to enlarge it.)

If you’d like, you can turn off indexing only for files in certain locations. To do this, type index in the Windows 10 search box and click the Indexing Options result that appears. The Indexing Options page of the Control Panel appears. Click the Modify button, and you’ll see a list of locations that are being indexed, such as Microsoft Outlook, your personal files, and so on. Uncheck the box next to any location, and it will no longer be indexed.

7. Clean out your hard disk

If you’ve got a bloated hard disk filled with files you don’t need, you could be slowing down your PC. Cleaning it out can give you a speed boost. Windows 10 has a surprisingly useful built-in tool for doing this called Storage Sense. Go to Settings > System > Storage and at the top of the screen, move the toggle from Off to On. When you do this, Windows constantly monitors your PC and deletes old junk files you no longer need — temporary files, files in the Downloads folder that haven’t been changed in a month, and old Recycle Bin files.

You can customize how Storage Sense works and also use it to free up even more space than it normally would. Underneath Storage Sense, click “Configure Storage Sense or run it now.” From the screen that appears, you can change how often Storage Sense deletes files (every day, every week, every month or when your storage space gets low).

You can also tell Storage Sense to delete files in your Download folder, depending on how long they’ve been there, and set how long to wait to delete files in the Recycle Bin automatically. You can also have Storage Sense move files from your PC to the cloud in Microsoft’s OneDrive cloud storage if they’re not opened for a certain amount of time (every day, or every 14 days, 30 days or 60 days).

Here’s how to customize the way Storage Sense works, and to tell it to delete old versions of Windows. (Click image to enlarge it.)

You can also delete old versions of Windows that might be hogging space. At the bottom of the screen, check the box next to “Delete previous versions of Windows.” Storage Sense will then delete old versions of Windows ten days after you’ve installed an upgrade. Note that if you do this, you won’t be able to revert to the older version of Windows.

8. Clean out your Registry

Under the Windows hood, the Registry tracks and controls just about everything about the way Windows works and looks. That includes information about where your programs are stored, which DLLs they use and share, what file types should be opened by which program, and just about everything else.

But the Registry is a very messy thing. When you uninstall a program, for example, that program’s settings don’t always get cleaned up in the Registry. So over time, it can get filled with countless outdated settings of all types. And that can lead to system slowdowns.

Don’t even think of trying to clean any of this out yourself. It’s impossible. To do it, you need a Registry Cleaner. There are plenty available, some free and some paid. But there’s really no need to outright buy one, because the free Auslogics Registry Cleaner does a solid job.

Before using Auslogics or any other Registry Cleaner, you should back up your Registry so you can restore it if anything goes wrong. (Auslogics Registry Cleaner does this for you as well, but it can’t hurt to have it backed up twice.) To do your own Registry backup, type regedit.ext in the search box, then press Enter. That runs the Registry editor. From the File menu, select Export. From the screen that appears, make sure to choose the “All” option in the Export range section at the bottom of the screen. Then choose a file location and file name and click Save. To restore the Registry, open the Registry editor, select Import from the File menu, then open the file you saved.

Now download, install and run Auslogics Registry Cleaner. On the left-hand side of the screen you can select the kinds of Registry issues you want to clean up — for example, File Associations, Internet or Fonts. I generally select them all.

Auslogics Registry Cleaner scans for and fixes problems in your Windows Registry. (Click image to enlarge it.)

Next, tell it to scan the Registry for problems. To do that, click “Scan Now,” and from the drop-down menu that appears, select Scan. That lets you first examine the Registry problems it finds. If you instead choose “Scan and Repair,” it makes the fixes without you checking them.

It now scans your Registry for errors, then shows you what it found. It ranks the errors according to their severity to help you decide which to fix. Click Repair when you’ve made your decision, and make sure that “Back Up Changes” is checked, so you can restore the Registry easily if something goes wrong.

Читайте также:  Runtime error at 109 229 linux
Оцените статью