VC++ Window

Windows
In a graphical Microsoft Windows-based application, a window is a rectangular area of the screen where the application displays output and receives input from the user. Therefore, one of the first tasks of a graphical Windows-based application is to create a window.

A window shares the screen with other windows, including those from other applications. Only one window at a time can receive input from the user. The user can use the mouse, keyboard, or other input device to interact with this window and the application that owns it.

Overviews

About Windows

This topic describes the programming elements that applications use to create and use windows; manage relationships between windows; and size, move, and display windows.

Using Windows

The examples in this section describe how to perform tasks associated with using windows.

Window Features

This overview discusses features of windows such as window types, states, size, and position.

WM_GESTURE

WM_GESTURENOTIFY

WM_TOUCHDOWN

WM_TOUCHMOVE

WM_TOUCHUP

Functions

AdjustWindowRect

The AdjustWindowRect function calculates the required size of the window rectangle, based on the desired client-rectangle size. The window rectangle can then be passed to the CreateWindow function to create a window whose client area is the desired size.

To specify an extended window style, use the AdjustWindowRectEx function.

AdjustWindowRectEx

The AdjustWindowRectEx function calculates the required size of the window rectangle, based on the desired size of the client rectangle. The window rectangle can then be passed to the CreateWindowEx function to create a window whose client area is the desired size.

AllowActivateDetachQueuesSetFocus

Enables synchronization of behaviors, such as focus and activation, when switching input processing between different threads.

AllowSetForegroundWindow

The AllowSetForegroundWindow function enables the specified process to set the foreground window using the SetForegroundWindow function. The calling process must already be able to set the foreground window. For more information, see Remarks later in this topic.

AnimateWindow

The AnimateWindow function enables you to produce special effects when showing or hiding windows. There are four types of animation: roll, slide, collapse or expand, and alpha-blended fade.

AnyPopup

The AnyPopup function indicates whether an owned, visible, top-level pop-up, or overlapped window exists on the screen. The function searches the entire screen, not just the calling application's client area.

This function is provided only for compatibility with 16-bit versions of Windows. It is generally not useful.

ArrangeIconicWindows

The ArrangeIconicWindows function arranges all the minimized (iconic) child windows of the specified parent window.

BeginDeferWindowPos

The BeginDeferWindowPos function allocates memory for a multiple-window- position structure and returns the handle to the structure.

BringWindowToTop

The BringWindowToTop function brings the specified window to the top of the Z order. If the window is a top-level window, it is activated. If the window is a child window, the top-level parent window associated with the child window is activated.

CalculatePopupWindowPosition

Calculates an appropriate pop-up window position using the specified anchor point, pop-up window size, flags, and the optional exclude rectangle. When the specified pop-up window size is smaller than the desktop window size, use the CalculatePopupWindowPosition function to ensure that the pop-up window is fully visible on the desktop window, regardless of the specified anchor point.

CascadeWindows

The CascadeWindows function cascades the specified child windows of the specified parent window.

ChangeWindowMessageFilter

Adds or removes a message from the User Interface Privilege Isolation (UIPI) message filter.

ChangeWindowMessageFilterEx

Modifies the UIPI message filter for a specified window.

ChildWindowFromPoint

The ChildWindowFromPoint function determines which, if any, of the child windows belonging to a parent window contains the specified point. The search is restricted to immediate child windows. Grandchildren, and deeper descendant windows are not searched.

To skip certain child windows, use the ChildWindowFromPointEx function.

ChildWindowFromPointEx

The ChildWindowFromPointEx function determines which, if any, of the child windows belonging to the specified parent window contains the specified point. The function can ignore invisible, disabled, and transparent child windows. The search is restricted to immediate child windows. Grandchildren and deeper descendants are not searched.

CloseWindow

The CloseWindow function minimizes (but does not destroy) the specified window.

CreateWindow

The CreateWindow function creates an overlapped, pop-up, or child window. It specifies the window class, window title, window style, and (optionally) the initial position and size of the window. The function also specifies the window's parent or owner, if any, and the window's menu.

To use extended window styles in addition to the styles supported by CreateWindow, use the CreateWindowEx function.

CreateWindowEx

The CreateWindowEx function creates an overlapped, pop-up, or child window with an extended window style; otherwise, this function is identical to the CreateWindow function. For more information about creating a window and for full descriptions of the other parameters of CreateWindowEx, see CreateWindow.

DeferWindowPos

The DeferWindowPos function updates the specified multiple-window

DeregisterShellHookWindow

Unregisters a specified Shell window that is registered to receive Shell hook messages. It unregisters windows that are registered with a call to the RegisterShellHookWindow function.

DestroyWindow

The DestroyWindow function destroys the specified window. The function sends WM_DESTROY and WM_NCDESTROY messages to the window to deactivate it and remove the keyboard focus from it. The function also destroys the window's menu, flushes the thread message queue, destroys timers, removes clipboard ownership, and breaks the clipboard viewer chain (if the window is at the top of the viewer chain).

If the specified window is a parent or owner window, DestroyWindow automatically destroys the associated child or owned windows when it destroys the parent or owner window. The function first destroys child or owned windows, and then it destroys the parent or owner window.

DestroyWindow also destroys modeless dialog boxes created by the CreateDialog function.

EndDeferWindowPos

The EndDeferWindowPos function simultaneously updates the position and size of one or more windows in a single screen-refreshing cycle.

EndTask

The EndTask function is called to forcibly close a specified window.

EnumChildProc

The EnumChildProc function is an application-defined callback function used with the EnumChildWindows function. It receives the child window handles. The WNDENUMPROC type defines a pointer to this callback function. EnumChildProc is a placeholder for the application-defined function name.

EnumChildWindows

The EnumChildWindows function enumerates the child windows that belong to the specified parent window by passing the handle to each child window, in turn, to an application-defined callback function. EnumChildWindows continues until the last child window is enumerated or the callback function returns FALSE.

EnumThreadWindows

The EnumThreadWindows function enumerates all nonchild windows associated with a thread by passing the handle to each window, in turn, to an application-defined callback function. EnumThreadWindows continues until the last window is enumerated or the callback function returns FALSE. To enumerate child windows of a particular window, use the EnumChildWindows function.

EnumThreadWndProc

The EnumThreadWndProc function is an application-defined callback function used with the EnumThreadWindows function. It receives the window handles associated with a thread. The WNDENUMPROC type defines a pointer to this callback function. EnumThreadWndProc is a placeholder for the application-defined function name.

EnumWindows

The EnumWindows function enumerates all top-level windows on the screen by passing the handle to each window, in turn, to an application-defined callback function. EnumWindows continues until the last top-level window is enumerated or the callback function returns FALSE.

EnumWindowsProc

The EnumWindowsProc function is an application-defined callback function used with the EnumWindows or EnumDesktopWindows function. It receives top-level window handles. The WNDENUMPROC type defines a pointer to this callback function. EnumWindowsProc is a placeholder for the application-defined function name.

FindWindow

The FindWindow function retrieves a handle to the top-level window whose class name and window name match the specified strings. This function does not search child windows. This function does not perform a case-sensitive search.

To search child windows, beginning with a specified child window, use the FindWindowEx function.

FindWindowEx

The FindWindowEx function retrieves a handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the specified child window. This function does not perform a case-sensitive search.

GetAltTabInfo

The GetAltTabInfo function retrieves status information for the specified window if it is the application-switching (ALT+TAB) window.

GetAncestor

The GetAncestor function retrieves the handle to the ancestor of the specified window.

GetClientRect

The GetClientRect function retrieves the coordinates of a window's client area. The client coordinates specify the upper-left and lower-right corners of the client area. Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0).

GetDesktopWindow

The GetDesktopWindow function returns a handle to the desktop window. The desktop window covers the entire screen. The desktop window is the area on top of which other windows are painted.

GetForegroundWindow

The GetForegroundWindow function returns a handle to the foreground window (the window with which the user is currently working). The system assigns a slightly higher priority to the thread that creates the foreground window than it does to other threads.

GetGUIThreadInfo

Retrieves information about the active window or a specified graphical user interface (GUI) thread.

GetLastActivePopup

The GetLastActivePopup function determines which pop-up window owned by the specified window was most recently active.

GetLayeredWindowAttributes

The GetLayeredWindowAttributes function retrieves the opacity and transparency color key of a layered window.

GetNextWindow

The GetNextWindow function retrieves a handle to the next or previous window in the Z-Order. The next window is below the specified window; the previous window is above. If the specified window is a topmost window, the function retrieves a handle to the next (or previous) topmost window. If the specified window is a top-level window, the function retrieves a handle to the next (or previous) top-level window. If the specified window is a child window, the function searches for a handle to the next (or previous) child window.

GetParent

The GetParent function retrieves a handle to the specified window's parent or owner.

To retrieve a handle to a specified ancestor, use the GetAncestor function.

GetProcessDefaultLayout

The GetProcessDefaultLayout function gets the default layout that is used when windows are created with no parent or owner.

GetShellWindow

The GetShellWindow function returns a handle to the Shell's desktop window.

GetTitleBarInfo

The GetTitleBarInfo function retrieves information about the specified title bar.

GetTopWindow

The GetTopWindow function examines the Z order of the child windows associated with the specified parent window and retrieves a handle to the child window at the top of the Z order.

GetWindow

The GetWindow function retrieves a handle to a window that has the specified relationship (Z-Order or owner) to the specified window.

GetWindowDisplayAffinity

Retrieves the current display affinity setting, from any process, for a given window.

GetWindowInfo

The GetWindowInfo function retrieves information about the specified window.

GetWindowModuleFileName

The GetWindowModuleFileName function retrieves the full path and file name of the module associated with the specified window handle.

GetWindowPlacement

The GetWindowPlacement function retrieves the show state and the restored, minimized, and maximized positions of the specified window.

GetWindowRect

The GetWindowRect function retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.

GetWindowText

The GetWindowText function copies the text of the specified window's title bar (if it has one) into a buffer. If the specified window is a control, the text of the control is copied. However, GetWindowText cannot retrieve the text of a control in another application.

GetWindowTextLength

The GetWindowTextLength function retrieves the length, in characters, of the specified window's title bar text (if the window has a title bar). If the specified window is a control, the function retrieves the length of the text within the control. However, GetWindowTextLength cannot retrieve the length of the text of an edit control in another application.

GetWindowThreadProcessId

The GetWindowThreadProcessId function retrieves the identifier of the thread that created the specified window and, optionally, the identifier of the process that created the window.

InternalGetWindowText

This function is similar to the GetWindowText function. However, it obtains the window text directly from the window structure associated with the specified window's handle and then always provides the text as a unicode string. This is unlike GetWindowText which obtains the text by sending the window a WM_GETTEXT message. If the specified window is a control, the text of the control is obtained.

IsChild

The IsChild function tests whether a window is a child window or descendant window of a specified parent window. A child window is the direct descendant of a specified parent window if that parent window is in the chain of parent windows; the chain of parent windows leads from the original overlapped or pop-up window to the child window.

IsGUIThread

The IsGUIThread function tests whether the calling thread is already a GUI thread. It can also optionally convert the thread to a GUI thread.

IsHungAppWindow

You call the IsHungAppWindow function to determine if Windows considers that a specified application is not responding. An application is considered to be not responding if it is not waiting for input, is not in startup processing, and has not called PeekMessage within the internal timeout period of 5 seconds.

IsIconic

The IsIconic function determines whether the specified window is minimized (iconic).

IsProcessDPIAware

Gets a value that indicates if the current process is dots per inch (dpi) aware such that it adjusts the sizes of user interface (UI) elements to compensate for the dpi setting.

IsWindow

The IsWindow function determines whether the specified window handle identifies an existing window.

IsWindowUnicode

The IsWindowUnicode function determines whether the specified window is a native Unicode window.

IsWindowVisible

The IsWindowVisible function retrieves the visibility state of the specified window.

IsZoomed

The IsZoomed function determines whether a window is maximized.

LockSetForegroundWindow

The foreground process can call the LockSetForegroundWindow function to disable calls to the SetForegroundWindow function.

LogicalToPhysicalPoint

Converts the logical coordinates of a point in a window to physical coordinates.

MoveWindow

The MoveWindow function changes the position and dimensions of the specified window. For a top-level window, the position and dimensions are relative to the upper-left corner of the screen. For a child window, they are relative to the upper-left corner of the parent window's client area.

OpenIcon

The OpenIcon function restores a minimized (iconic) window to its previous size and position; it then activates the window.

PhysicalToLogicalPoint

Converts the physical coordinates of a point in a window to logical coordinates.

RealChildWindowFromPoint

The RealChildWindowFromPoint function retrieves a handle to the child window at the specified point. The search is restricted to immediate child windows; grandchildren and deeper descendant windows are not searched.

RealGetWindowClass

The RealGetWindowClass function retrieves a string that specifies the window type.

RegisterShellHookWindow

Registers a specified Shell window to receive certain messages for events or notifications that are useful to Shell applications. The event messages received are only those sent to the Shell window associated with the specified window's desktop. Many of the messages are the same as those that can be received after calling the SetWindowsHookEx function and specifying WH_SHELL for the hook type. The difference with RegisterShellHookWindow is that the messages are received through the specified window's WindowProc and not through a call back procedure.

SetForegroundWindow

The SetForegroundWindow function puts the thread that created the specified window into the foreground and activates the window. Keyboard input is directed to the window, and various visual cues are changed for the user. The system assigns a slightly higher priority to the thread that created the foreground window than it does to other threads.

SetLayeredWindowAttributes

The SetLayeredWindowAttributes function sets the opacity and transparency color key of a layered window.

SetParent

The SetParent function changes the parent window of the specified child window.

SetProcessDefaultLayout

The SetProcessDefaultLayout function changes the default layout when windows are created with no parent or owner only for the currently running process.

SetProcessDPIAware

Sets the current process as dpi aware.

SetWindowDisplayAffinity

Stores the display affinity setting in kernel mode on the hWnd associated with the window.

SetWindowPlacement

The SetWindowPlacement function sets the show state and the restored, minimized, and maximized positions of the specified window.

SetWindowPos

Changes the size, position, and Z order of a child, pop-up, or top-level window. These windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and is the first window in the Z order.

SetWindowText

The SetWindowText function changes the text of the specified window's title bar (if it has one). If the specified window is a control, the text of the control is changed. However, SetWindowText cannot change the text of a control in another application.

ShowOwnedPopups

The ShowOwnedPopups function shows or hides all pop-up windows owned by the specified window.

ShowWindow

The ShowWindow function sets the specified window's show state.

ShowWindowAsync

The ShowWindowAsync function sets the show state of a window created by a different thread.

SoundSentry

The SoundSentry function triggers a visual signal to indicate that a sound is playing.

SwitchToThisWindow

The SwitchToThisWindow function is called to switch focus to a specified window and bring it to the foreground.

TileWindows

The TileWindows function tiles the specified child windows of the specified parent window.

UpdateLayeredWindow

The UpdateLayeredWindow function updates the position, size, shape, content, and translucency of a layered window.

UpdateLayeredWindowIndirect

Updates the position, size, shape, content, and translucency of a layered window.

WindowFromPhysicalPoint

Retrieves a handle to the window that contains the specified physical point.

WindowFromPoint

The WindowFromPoint function retrieves a handle to the window that contains the specified point.

WinMain

The WinMain function is the conventional name for the user-provided entry point for a Windows-based application.

Macros

GET_X_LPARAM

The GET_X_LPARAM macro retrieves the signed x-coordinate from the given LPARAM value.

GET_Y_LPARAM

The GET_Y_LPARAM macro retrieves the signed y-coordinate from the given LPARAM value.

HIBYTE

The HIBYTE macro retrieves the high-order byte from the given 16-bit value.

HIWORD

The HIWORD macro retrieves the high-order word from the given 32-bit value.

LOBYTE

The LOBYTE macro retrieves the low-order byte from the specified value.

LOWORD

The LOWORD macro retrieves the low-order word from the specified value.

MAKELONG

The MAKELONG macro creates a LONG value by concatenating the specified values.

MAKELPARAM

The MAKELPARAM macro creates a value for use as an lParam parameter in a message. The macro concatenates the specified values.

MAKELRESULT

The MAKELRESULT macro creates a value for use as a return value from a window procedure. The macro concatenates the specified values.

MAKEWORD

The MAKEWORD macro creates a WORD value by concatenating the specified values.

MAKEWPARAM

The MAKEWPARAM macro creates a value for use as a wParam parameter in a message. The macro concatenates the specified values.

Messages

MN_GETHMENU

An application sends the MN_GETHMENU message to get the HMENU for the current window.

WM_GETFONT

An application sends a WM_GETFONT message to a control to retrieve the font with which the control is currently drawing its text.

WM_GETTEXT

An application sends a WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by the caller.

WM_GETTEXTLENGTH

An application sends a WM_GETTEXTLENGTH message to determine the length, in characters, of the text associated with a window.

WM_SETFONT

An application sends a WM_SETFONT message to specify the font that a control is to use when drawing text.

WM_SETICON

An application sends the WM_SETICON message to associate a new large or small icon with a window. The system displays the large icon in the ALT+TAB dialog box, and the small icon in the window caption.

WM_SETTEXT

An application sends a WM_SETTEXT message to set the text of a window.

Notifications

WM_ACTIVATEAPP

The WM_ACTIVATEAPP message is sent when a window belonging to a different application than the active window is about to be activated. The message is sent to the application whose window is being activated and to the application whose window is being deactivated.

A window receives this message through its WindowProc function.

WM_CANCELMODE

The WM_CANCELMODE message is sent to cancel certain modes, such as mouse capture. For example, the system sends this message to the active window when a dialog box or message box is displayed. Certain functions also send this message explicitly to the specified window regardless of whether it is the active window. For example, the EnableWindow function sends this message when disabling the specified window.

A window receives this message through its WindowProc function.

WM_CHILDACTIVATE

The WM_CHILDACTIVATE message is sent to a child window when the user clicks the window's title bar or when the window is activated, moved, or sized.

A window receives this message through its WindowProc function.

WM_CLOSE

The WM_CLOSE message is sent as a signal that a window or an application should terminate.

A window receives this message through its WindowProc function.

WM_COMPACTING

The WM_COMPACTING message is sent to all top-level windows when the system detects more than 12.5 percent of system time over a 30- to 60-second interval is being spent compacting memory. This indicates that system memory is low.

A window receives this message through its WindowProc function.

Note  This message is provided only for compatibility with 16-bit Windows-based applications.
WM_CREATE

The WM_CREATE message is sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. (The message is sent before the function returns.) The window procedure of the new window receives this message after the window is created, but before the window becomes visible.

A window receives this message through its WindowProc function.

WM_DESTROY

The WM_DESTROY message is sent when a window is being destroyed. It is sent to the window procedure of the window being destroyed after the window is removed from the screen.

This message is sent first to the window being destroyed and then to the child windows (if any) as they are destroyed. During the processing of the message, it can be assumed that all child windows still exist.

A window receives this message through its WindowProc function.

WM_ENABLE

The WM_ENABLE message is sent when an application changes the enabled state of a window. It is sent to the window whose enabled state is changing. This message is sent before the EnableWindow function returns, but after the enabled state (WS_DISABLED style bit) of the window has changed.

A window receives this message through its WindowProc function.

WM_ENTERSIZEMOVE

The WM_ENTERSIZEMOVE message is sent one time to a window after it enters the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns.

The system sends the WM_ENTERSIZEMOVE message regardless of whether the dragging of full windows is enabled.

A window receives this message through its WindowProc function.

WM_EXITSIZEMOVE

The WM_EXITSIZEMOVE message is sent one time to a window, after it has exited the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns.

A window receives this message through its WindowProc function.

WM_GETICON

The WM_GETICON message is sent to a window to retrieve a handle to the large or small icon associated with a window. The system displays the large icon in the ALT+TAB dialog, and the small icon in the window caption.

A window receives this message through its WindowProc function.

WM_GETMINMAXINFO

The WM_GETMINMAXINFO message is sent to a window when the size or position of the window is about to change. An application can use this message to override the window's default maximized size and position, or its default minimum or maximum tracking size.

A window receives this message through its WindowProc function.

WM_INPUTLANGCHANGE

The WM_INPUTLANGCHANGE message is sent to the topmost affected window after an application's input language has been changed. You should make any application-specific settings and pass the message to the DefWindowProc function, which passes the message to all first-level child windows. These child windows can pass the message to DefWindowProc to have it pass the message to their child windows, and so on.

A window receives this message through its WindowProc function.

WM_INPUTLANGCHANGEREQUEST

The WM_INPUTLANGCHANGEREQUEST message is posted to the window with the focus when the user chooses a new input language, either with the hotkey (specified in the Keyboard control panel application) or from the indicator on the system taskbar. An application can accept the change by passing the message to the DefWindowProc function or reject the change (and prevent it from taking place) by returning immediately.

A window receives this message through its WindowProc function.

WM_MOVE

The WM_MOVE message is sent after a window has been moved.

A window receives this message through its WindowProc function.

WM_MOVING

The WM_MOVING message is sent to a window that the user is moving. By processing this message, an application can monitor the position of the drag rectangle and, if needed, change its position.

A window receives this message through its WindowProc function.

WM_NCACTIVATE

The WM_NCACTIVATE message is sent to a window when its nonclient area needs to be changed to indicate an active or inactive state.

A window receives this message through its WindowProc function.

WM_NCCALCSIZE

The WM_NCCALCSIZE message is sent when the size and position of a window's client area must be calculated. By processing this message, an application can control the content of the window's client area when the size or position of the window changes.

A window receives this message through its WindowProc function.

WM_NCCREATE

The WM_NCCREATE message is sent prior to the WM_CREATE message when a window is first created.

A window receives this message through its WindowProc function.

WM_NCDESTROY

The WM_NCDESTROY message informs a window that its nonclient area is being destroyed. The DestroyWindow function sends the WM_NCDESTROY message to the window following the WM_DESTROY message. WM_DESTROY is used to free the allocated memory object associated with the window.

The WM_NCDESTROY message is sent after the child windows have been destroyed. In contrast, WM_DESTROY is sent before the child windows are destroyed.

A window receives this message through its WindowProc function.

WM_NULL

The WM_NULL message performs no operation. An application sends the WM_NULL message if it wants to post a message that the recipient window will ignore.

A window receives this message through its WindowProc function.

WM_PARENTNOTIFY

The WM_PARENTNOTIFY message is sent to the parent of a child window when the child window is created or destroyed, or when the user clicks a mouse button while the cursor is over the child window. When the child window is being created, the system sends WM_PARENTNOTIFY just before the CreateWindow or CreateWindowEx function that creates the window returns. When the child window is being destroyed, the system sends the message before any processing to destroy the window takes place.

A window receives this message through its WindowProc function.

WM_QUERYDRAGICON

The WM_QUERYDRAGICON message is sent to a minimized (iconic) window. The window is about to be dragged by the user but does not have an icon defined for its class. An application can return a handle to an icon or cursor. The system displays this cursor or icon while the user drags the icon.

A window receives this message through its WindowProc function.

WM_QUERYOPEN

The WM_QUERYOPEN message is sent to an icon when the user requests that the window be restored to its previous size and position.

A window receives this message through its WindowProc function.

WM_SHOWWINDOW

The WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown.

A window receives this message through its WindowProc function.

WM_SIZE

The WM_SIZE message is sent to a window after its size has changed.

A window receives this message through its WindowProc function.

WM_SIZING

The WM_SIZING message is sent to a window that the user is resizing. By processing this message, an application can monitor the size and position of the drag rectangle and, if needed, change its size or position.

A window receives this message through its WindowProc function.

WM_STYLECHANGED

The WM_STYLECHANGED message is sent to a window after the SetWindowLong function has changed one or more of the window's styles.

A window receives this message through its WindowProc function.

WM_STYLECHANGING

The WM_STYLECHANGING message is sent to a window when the SetWindowLong function is about to change one or more of the window's styles.

A window receives this message through its WindowProc function.

WM_THEMECHANGED

The WM_THEMECHANGED message is broadcast to every window following a theme change event. Examples of theme change events are the activation of a theme, the deactivation of a theme, or a transition from one theme to another.

WM_USERCHANGED

The WM_USERCHANGED message is sent to all windows after the user has logged on or off. When the user logs on or off, the system updates the user-specific settings. The system sends this message immediately after updating the settings.

A window receives this message through its WindowProc function.

WM_WINDOWPOSCHANGED

The WM_WINDOWPOSCHANGED message is sent to a window whose size, position, or place in the Z order has changed as a result of a call to the SetWindowPos function or another window-management function.

A window receives this message through its WindowProc function.

WM_WINDOWPOSCHANGING

The WM_WINDOWPOSCHANGING message is sent to a window whose size, position, or place in the Z order is about to change as a result of a call to the SetWindowPos function or another window-management function.

A window receives this message through its WindowProc function.

Structures

ALTTABINFO

The ALTTABINFO structure contains status information for the application-switching (ALT+TAB) window.

CHANGEFILTERSTRUCT

Contains extended result information obtained by calling the ChangeWindowMessageFilterEx function.

CLIENTCREATESTRUCT

The CLIENTCREATESTRUCT structure contains information about the menu and first multiple-document interface (MDI) child window of an MDI client window. An application passes a pointer to this structure as the lpParam parameter of the CreateWindow function when creating an MDI client window.

CREATESTRUCT

The CREATESTRUCT structure defines the initialization parameters passed to the window procedure of an application. These members are identical to the parameters of the CreateWindowEx function.

GUITHREADINFO

The GUITHREADINFO structure contains information about a GUI thread.

MINMAXINFO

The MINMAXINFO structure contains information about a window's maximized size and position and its minimum and maximum tracking size.

NCCALCSIZE_PARAMS

The NCCALCSIZE_PARAMS structure contains information that an application can use while processing the WM_NCCALCSIZE message to calculate the size, position, and valid contents of the client area of a window.

STYLESTRUCT

The STYLESTRUCT structure contains the styles for a window.

TITLEBARINFO

The TITLEBARINFO structure contains title bar information.

TITLEBARINFOEX

Expands on the information described in the TITLEBARINFO structure by including the coordinates of each element of the title bar.

This structure is sent with the WM_GETTITLEBARINFOEX message.

UPDATELAYEREDWINDOWINFO

Used by UpdateLayeredWindowIndirect to provide position, size, shape, content, and translucency information for a layered window.

WINDOWINFO

The WINDOWINFO structure contains window information.

WINDOWPLACEMENT

The WINDOWPLACEMENT structure contains information about the placement of a window on the screen.

WINDOWPOS

The WINDOWPOS structure contains information about the size and position of a window.

Constants

Window Styles

The following styles can be specified wherever a window style is required. After the control has been created, these styles cannot be modified, except as noted.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值