The relationship between windows and windows

Reference article: http://www.cnblogs.com/dhatbj/p/3288152.html

1. Desktop window:

DesktipWindow is the parent window of all windows, obtained through hwnd=::GetDesktopWindow().

Second, the window style:

There are only three types of windows: overlapping windows (WS_OVERLAPPED), pop-up windows (WS_POP), and child windows (WS_CHILD, where pop-up windows cannot be child windows ).

Overlapping windows and pop-up windows are collectively referred to as top-level windows.

Therefore, the window style is again divided into: top-level window and sub-window.

You can say that

Third, the topmost window:

The topmost window is a window with the WS_EX_TOPMOST style, which is an extended style of the window. The topmost window can only be a top-level window, not a child window .

The Z-ORDER of the top-level window of a window with the topmost style is smaller than that of a window without that style, displayed in the front.

、 、 Z-Order:

The z-order is displayed in the front (small) window first, and the window displayed first will be covered by the window displayed later.

Each parent window has a linked list for saving child windows, and the order in which the linked list saves the child windows is the order of the z_order of the child window. The window with z_order in front (z_order is small) is displayed first .

For the top-level window, the window with z_order in front is displayed at the front, because the top-level window is forced to add the WS_CLIPSIBLINGS style by default, so that the place where the window refreshed later is covered is not refreshed, so that the window with z_order in front is displayed in the front .

For child windows, the situation is opposite to that of top-level windows, where the window with z_order in front is covered by the window behind. Because it does not add the WS_CLIPSIBLINGS style by default .

The z_order of the child window is larger than the z_order of the parent window, because the child window can only be displayed when the parent window is displayed, and the display of the child window in the back means that its z_order is larger.

HWND hwnd=::GetWindow(hWnd_rel,flag) is used to get the handle of the window that has a flag relationship to hWnd_rel.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324900723&siteId=291194637