- Create installation media for Windows
- Creating a Window
- Window Classes
- Creating the Window
- Balance work and family
- Stay connected
- Create. Teach. Learn.
- Home & family resources
- You can count on Windows 10
- Get things done
- All-encompassing security included
- New games for family night
- Windows 10 for each of us
- Unlock the best Microsoft 365 has to offer! Now with added benefits from Microsoft partners.
- Bring your ideas to life
- Organize your time
- Sharing made simple
- Protect what’s important
- Thousands of apps
- Compare Windows 10 Home vs. Pro
- The best Windows ever keeps getting better
- Windows 10 Pro works for you
- Make the switch to a Windows 10 PC
- Find the computer that’s best for you
- Need help choosing a computer?
Create installation media for Windows
You can use installation media (a USB flash drive or DVD) to install a new copy of Windows, perform a clean installation, or reinstall Windows 10.
To create installation media, go to the software download website, where you’ll find step-by-step instructions. On that website, you can select a version of Windows and create your own installation media using either a USB flash drive or a DVD. To go directly to one of the versions, select one of these links:
Windows 10 (Then select Download tool now.)
Important: Back up your files before you install or reinstall Windows on your PC. Learn how for Windows 10 or for Windows 7 and Windows 8.1.
To create the installation media, here’s what you’ll need:
A PC with a reliable internet connection. The download time will vary, depending on your internet connection.
A USB flash drive or DVD. A blank USB flash drive with at least 8 GB of space, or a blank DVD (and DVD burner). We recommend using a blank USB or blank DVD because any content on it will be deleted. When burning a DVD from an ISO file, if you’re told the disc image file is too large, you’ll need to use dual layer (DL) DVD media.
A product key. Your 25-character product key (not required for digital licenses). For help finding it, go to Find your Windows product key.
After you’ve created the installation media, you can reset or reinstall Windows. To learn more, go to Recovery options in Windows 10.
Creating a Window
Window Classes
A window class defines a set of behaviors that several windows might have in common. For example, in a group of buttons, each button has a similar behavior when the user clicks the button. Of course, buttons are not completely identical; each button displays its own text string and has its own screen coordinates. Data that is unique for each window is called instance data.
Every window must be associated with a window class, even if your program only ever creates one instance of that class. It is important to understand that a window class is not a «class» in the C++ sense. Rather, it is a data structure used internally by the operating system. Window classes are registered with the system at run time. To register a new window class, start by filling in a WNDCLASS structure:
You must set the following structure members:
- lpfnWndProc is a pointer to an application-defined function called the window procedure or «window proc.» The window procedure defines most of the behavior of the window. We’ll examine the window procedure in detail later. For now, just treat this as a forward reference.
- hInstance is the handle to the application instance. Get this value from the hInstance parameter of wWinMain.
- lpszClassName is a string that identifies the window class.
Class names are local to the current process, so the name only needs to be unique within the process. However, the standard Windows controls also have classes. If you use any of those controls, you must pick class names that do not conflict with the control class names. For example, the window class for the button control is named «Button».
The WNDCLASS structure has other members not shown here. You can set them to zero, as shown in this example, or fill them in. The MSDN documentation describes the structure in detail.
Next, pass the address of the WNDCLASS structure to the RegisterClass function. This function registers the window class with the operating system.
Creating the Window
To create a new instance of a window, call the CreateWindowEx function:
You can read detailed parameter descriptions on MSDN, but here is a quick summary:
- The first parameter lets you specify some optional behaviors for the window (for example, transparent windows). Set this parameter to zero for the default behaviors.
- CLASS_NAME is the name of the window class. This defines the type of window you are creating.
- The window text is used in different ways by different types of windows. If the window has a title bar, the text is displayed in the title bar.
- The window style is a set of flags that define some of the look and feel of a window. The constant WS_OVERLAPPEDWINDOW is actually several flags combined with a bitwise OR. Together these flags give the window a title bar, a border, a system menu, and Minimize and Maximize buttons. This set of flags is the most common style for a top-level application window.
- For position and size, the constant CW_USEDEFAULT means to use default values.
- The next parameter sets a parent window or owner window for the new window. Set the parent if you are creating a child window. For a top-level window, set this to NULL.
- For an application window, the next parameter defines the menu for the window. This example does not use a menu, so the value is NULL.
- hInstance is the instance handle, described previously. (See WinMain: The Application Entry Point.)
- The last parameter is a pointer to arbitrary data of type void*. You can use this value to pass a data structure to your window procedure. We’ll show one possible way to use this parameter in the section Managing Application State.
CreateWindowEx returns a handle to the new window, or zero if the function fails. To show the window—that is, make the window visible —pass the window handle to the ShowWindow function:
The hwnd parameter is the window handle returned by CreateWindowEx. The nCmdShow parameter can be used to minimize or maximize a window. The operating system passes this value to the program through the wWinMain function.
Here is the complete code to create the window. Remember that WindowProc is still just a forward declaration of a function.
Congratulations, you’ve created a window! Right now, the window does not contain any content or interact with the user. In a real GUI application, the window would respond to events from the user and the operating system. The next section describes how window messages provide this sort of interactivity.
Balance work and family
See how multitasking parents use Windows 10 to get it all done.
Stay connected
See how professionals work effectively in a remote world.
Create. Teach. Learn.
See how you can share your craft in a remote world.
Home & family resources
Discover free Microsoft tools, tips, and resources that can help you connect, work, learn, and play at home.
You can count on Windows 10
People all over the world depend on Windows 10 for many different reasons. Here are a handful of things we’re proud to keep on delivering.
Get things done
Windows 10 has innovations from touch screen 2 support to features that help you focus and create.
All-encompassing security included
Windows 10 comes with a comprehensive suite of antivirus, firewall, ransomware protection, and Internet features, built-in with no extra cost to you. 1
New games for family night
There’s a wide variety of games available on Windows 10—the most popular PC gaming platform on the planet. 3
Windows 10 for each of us
Whether you have a disability, a personal preference, or a unique work style, Windows 10 adapts to you.
Need a larger screen? A brighter screen? A narrator to read text? Find out about accessibility tools and features for people who are blind, color blind, or have low vision.
For those who are hard of hearing, have hearing loss, or have deafness, our specialized features can provide solutions including closed captioning, mono sound, and live call transcription.
Innovative tools such as dictation and Windows Hello sign-in can make the digital world more accessible for those who live with dyslexia, seizures, autism, or other cognitive differences.
Our applications for people living with learning disabilities can help increase focus, concentration, and understanding—and include tools to improve reading and writing skills.
Our suite of products helps people living with arthritis, quadriplegia, spinal cord injuries, and other mobility issues to navigate the digital world in non-traditional ways.
Unlock the best Microsoft 365 has to offer! Now with added benefits from Microsoft partners.
As a benefit of your subscription, access over $500 in unique offers available from our partners.
Bring your ideas to life
Choose from thousands of curated stock images, icons, and fonts to add your own flair quickly and beautifully.
Organize your time
Manage multiple calendars in one view, sort through emails quickly with Focused Inbox, and use Suggested Replies to instantly hit send and move on.
Sharing made simple
Share OneDrive documents from your PC or mobile device and let friends, classmates, or family view, make suggestions, edit, or collaborate in real time.
Protect what’s important
Get 1 TB of OneDrive cloud storage. That’s 300,000 photos, plus all your documents, 4 that you can access, edit, and share across all your devices—all while knowing your files are backed up and protected.
Thousands of apps
Work, play, create, stream, meet, share, and more with thousands of trusted apps from the Microsoft Store. All of them have been scanned for malware, so you can download anything worry-free. 5
Compare Windows 10 Home vs. Pro
Find the right fit for your needs. Whether it’s Windows 10 Home or Windows 10 Pro, see which version is better for you.
The best Windows ever keeps getting better
Windows 10 is fundamentally fast and familiar, safe and secure, and has features that allow you to be more creative and productive.
Windows 10 Pro works for you
If you run a small business and want enhanced functionality, Windows 10 Pro is designed for how you work.
Make the switch to a Windows 10 PC
Powerful productivity. Great battery life. Long lasting. And a beautiful touch screen to boot. 2
Find the computer that’s best for you
Now more than ever PCs are more powerful and innovative—just like Windows 10. And no matter your budget or need, there are plenty to choose from.
Need help choosing a computer?
We’re here to help! Answer a few questions and find the right Windows 10 computers for you.