# Windows USER

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Windows_USER
> Markdown URL: https://mediated.wiki/source/Windows_USER.md
> Source: https://en.wikipedia.org/wiki/Windows_USER
> Source revision: 1356453652
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Verifiability|date=March 2022}}
{{Short description|Component of Microsoft Windows}}
'''Windows USER'''<ref>{{Cite web |last=stevewhims |title=User Objects - Win32 apps |url=https://learn.microsoft.com/en-us/windows/win32/sysinfo/user-objects |access-date=2026-05-27 |website=learn.microsoft.com |language=en-us}}</ref> is a component of the [Microsoft Windows](/source/Microsoft_Windows) [operating system](/source/operating_system) that provides core functionality for building simple [user interface](/source/user_interface)s. The component has existed in all versions of Windows, and includes functionality for [window management](/source/Window_manager), [message passing](/source/message_passing), [input processing](/source/Input_device) and standard [controls](/source/Graphical_widget).

==Functionality and role==

Windows USER provides a large part of the core user experience for Microsoft Windows. Historically, it was responsible for:<ref name="petzold">Petzold, Charles (1998). ''Programming Windows Fifth Edition'', Microsoft Press,  {{ISBN|978-1-57231-995-0}} .</ref><ref name="chen">Chen, Raymond (2007). ''The Old New Thing'', Addison-Wesley Professional, {{ISBN|978-0-321-44030-3}} 
</ref>

* Causing windows to be drawn (using [GDI](/source/Graphics_Device_Interface) as a device-independent API for drawing primitives)
* Obscuring [overlapping windows](/source/stacking_window_manager) behind others
* Window size and positioning
* Providing all the standard window management controls (such as close boxes or [title bar](/source/title_bar)s)
* Providing the standard Windows [menu bar](/source/menu_bar)
* Providing of standard controls (such as [button](/source/Button_(computing)), [List box](/source/List_box) or [Edit Box](/source/Text_box))
* Providing [dialog box management](/source/Dialog_manager) (short-cut keys, tab key processing)
* Processing all user input from the mouse and keyboard
* The [desktop](/source/desktop_metaphor) background image (until [Windows 8](/source/Windows_8))
* Drawing all standard visual elements
* [Inter-process communication](/source/Inter-process_communication) using [Dynamic Data Exchange](/source/Dynamic_Data_Exchange)
* Mouse pointer cursor display and management
* Data transfer ([Clipboard](/source/Clipboard_(computing)))

Gradually, as Windows has become larger and better factored, Windows USER has cooperated with other components to provide this functionality:

* Controls: Starting with [Windows 95](/source/Windows_95), new controls were placed into a separate common controls component. Starting with [Windows XP](/source/Windows_XP), new implementations of the standard controls were also moved to that same component.{{Citation needed|date=January 2023}}
* Standard Visuals: Starting with Windows XP, visual elements are drawn by the Theming component.
* Windows Management experience: Starting with [Windows Vista](/source/Windows_Vista), drawing standard window management was moved from Windows USER to the [Desktop Window Manager](/source/Desktop_Window_Manager) when the [Aero](/source/Windows_Aero) theme is enabled. Starting with [Windows 8](/source/Windows_8), window frames are always drawn by DWM, except in the [Windows Preinstallation Environment](/source/Windows_Preinstallation_Environment).
* Inter-program communication: Starting with Windows 3.1, [Object Linking and Embedding](/source/Object_Linking_and_Embedding) replaced Dynamic Data Exchange as the recommended model for inter program communication.
* Menu bar: Starting in Windows 7, the [Ribbon](/source/Ribbon_(computing)) interface is a recommended replacement for the menu bar and context menus. It is provided by the UIRibbon component.<ref>[https://msdn.microsoft.com/en-us/library/dd371191(VS.85).aspx Windows Ribbon Framework]</ref>
* Desktop wallpaper: Starting in [Windows 8](/source/Windows_8), drawing of the desktop wallpaper was moved to [Windows Explorer](/source/File_Explorer), except in the [Windows Preinstallation Environment](/source/Windows_Preinstallation_Environment), where the desktop wallpaper is drawn by the <code>WallpaperHost.exe</code> application. Wherever USER would have drawn the desktop background before, black is drawn, except when DWM is enabled, in which case, the user's accent will be drawn instead.{{Citation needed|date=January 2023}}
* Mouse pointer: Starting in [Windows Vista](/source/Windows_Vista) when DWM is enabled, drawing of the mouse pointer is managed by it. However, starting in [Windows 11](/source/Windows_11), it will no longer display with DWM disabled, unless the file <code>%SystemRoot%\System32\DWMInit.dll</code> does not exist.

==Developer experience==

Windows USER implements abstractions that are used to build Windows applications. These include

* <code>HWND</code> (Handle to Window)

The <code>HWND</code> is the basic unit of visual display and input in the Windows developer platform. All visual elements either have their own HWNDs or live as part of a larger <code>HWND</code>. Many functions in Windows USER manipulate properties on HWNDs such as size, position and title. Each <code>HWND</code> also has a communication channel (<code>WNDPROC</code> - Window Procedure) for delivery of messages.

Windows are managed as a tree, with the desktop window at the root of the hierarchy. Child windows are usually (but not always) visually contained within their parents.

* <code>MSG</code> (Message)

Applications and the operating system communicate with HWNDs using messages. A window message is the combination of a target <code>HWND</code>, a message code, and other details such as mouse position.

* Message Loop

By combining calls to Windows USER in the right way, a Windows application processes messages. The core Windows message loop (including calls to <code>GetMessage</code>, <code>TranslateMessage</code> and <code>DispatchMessage</code>) is at the core of any Windows application.

Developer functionality related to Windows USER is provided in the C header file winuser.h.

==Implementation==
In 16-bit versions of Windows, Windows USER was implemented as a file called user.exe. The file extension here was a [misnomer](/source/misnomer), as Windows USER was in fact always a [dynamic-link library](/source/dynamic-link_library).

In 32-bit versions of Windows, the 32-bit version of Windows USER is called user32.dll and is located in the System32 directory, while compatibility with 16-bit applications is provided by having a modified version of user.exe also present.

In 64-bit versions of Windows, the 64-bit implementation of Windows USER is called user32.dll and is located in the System32 directory, while a modified 32-bit version (also called user32.dll) is present in the SysWOW64 directory.

==See also==
*[Graphics Device Interface](/source/Graphics_Device_Interface) (GDI)
*[Microsoft Windows library files](/source/Microsoft_Windows_library_files)

==References==
{{reflist}}

==External links==
*[http://csi-windows.com/blog/all/73-windows-64-bit/379-what-is-wow64-windows-64-bit Comprehensive Reference on WOW64 Folders, Variables, Values and References] {{Webarchive|url=https://web.archive.org/web/20140621053622/http://csi-windows.com/blog/all/73-windows-64-bit/379-what-is-wow64-windows-64-bit |date=2014-06-21 }}

{{Windows Components}}

Category:Windows NT architecture
Category:Windows components
Category:Windows technology

---
Adapted from the Wikipedia article [Windows USER](https://en.wikipedia.org/wiki/Windows_USER) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Windows_USER?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
