Difference between ws_popup ws_overlapped ws_child

Source: Internet
Author: User

In addition to the window class, there are hundreds of window styles for you to specify the drawing and behavior of the window. Three most important styles correspond to three basic types of Windows: overlapping windows, pop-up windows, and subwindows.
■ Overlapped window with ApplicationProgramAll features of the main window. Its non-customer zone includes a scalable framework, menu bar, title bar, and minimization, and maximized button.
■ Pop-up window (popup window), with all the features of the message box or dialog box. Its non-customer zone includes a fixed-size frame and a title bar.

■ Child window has all the features similar to button controls. It does not have a non-customer zone, and the processing process of the window is responsible for drawing each part of the window.

///

Ws_popup ws_overlapped ws_child

Overlapped windows

An Overlapped window is a top-level window that has a title bar, border, and client area; it is meant to serve as an application's main window. it can also have a window menu, minimize and maximize buttons, and scroll bars. an Overlapped window used as a main window typically provided des all of these components.

By specifying the ws_overlapped or ws_overlappedwindow style in the createcontactwex function, an application creates an overlapped window. if you use the ws_overlapped style, the window has a title bar and border. if you use the ws_overlappedwindow style, the window has a title bar, sizing border, Window menu, and minimize and maximize buttons.

Pop-up windows

Pop-up windows are top-level windows and are connected to the desktop window's child windows list. applications usually use pop-up windows for dialog boxes. the main difference between pop-up and overlapped windows is that pop-up windows need not have captions and overlapped windows must have captions. when a pop-up window does not have a caption, it can be created without a border. pop-up windows may own other top-level windows or be owned by other top-level windows or both. all pop-up windows have the ws_clipsiblings style, even if it was not specified. pop-up windows must not be created with the cw_usedefault value for either the position or the size of the window. pop-up windows that use cw_usedefault will exist but will have no size or no position or both. overlapped windows are usually reserved for your application's main window and, in fact, are sometimes called main windows or frame windows. pop-up windows are usually used to communicate with the user in the form of dialog boxes and message boxes.

A pop-up window is a special type of overlapped window used for dialog boxes, message boxes, and other temporary windows that appear outside an application's main window. title bars are optional for pop-up windows; otherwise, pop-up windows are the same as overlapped windows of the ws_overlapped style.

You create a pop-up window by specifying the ws_popup style in createappswex. to include a title bar, specify the ws_caption style. use the ws_popupwindow style to create a pop-up window that has a border and a window menu. the ws_caption style must be combined with the ws_popupwindow style to make the Window Menu visible.

Child windows

child windows must have a parent window and are confined to the client area of their parent. this is the major distinction between child windows and overlapped and pop-up windows. child Window parents can be top-level windows or other child windows. child windows are positioned from their parent window's upper-left corner and not from the upper-left of the screen as are top-level windows. child windows are clipped to the client area of their parent. controls in a dialog box are child windows whose parent is the dialog box. child windows must not be created with the cw_usedefault value for either the position or size of the window. child windows that use cw_usedefault will exist but will have no size or position or both.

A child window has the ws_child style and is confined to the client area of its parent window. an application typically uses child windows to divide the client area of a parent window into functional areas. you create a child window by specifying the ws_child style in the createmediawex function.

A child window must have a parent window. the parent window can be an overlapped window, a pop-up window, or even another child window. you specify the parent window when you call createdomainwex. if you specify the ws_child style in createdomainwex but do not specify a parent window, the system does not create the window.

A child window has a client area but no other features, unless they are explicitly requested. an application can request a title bar, a window menu, minimize and maximize buttons, a border, and scroll bars for a child window, but a child window cannot have a menu. if the application specifies a menu handle, either when it registers the child's window class or creates the child window, the menu handle is ignored. if no border style is specified, the system creates a borderless window. an application can use borderless child windows to divide a parent window's client area while keeping the divisions invisible to the user.

 

The following is Google Translate, haha...

 

///
Ws_popup ws_overlapped ws_child
Overlapping windows
An overlapping window is a top-level window with a title bar, border and customer area. It serves as the main window of an application. It can also have a window menu, minimize and maximize buttons and scroll bars. Overlapping windows are usually used as the main window to include all these components.
Use the ws_overlapped or ws_overlappedwindow style specified in the createmediawex function to create an overlapping window for an application. If you use the ws_overlapped style, the window has a title bar and a border. If you use the ws_overlappedwindow style, the window has a title bar, border size, Window menu, and the minimization and maximization buttons.
Pop-up window
The pop-up window is a list of top-level windows that are connected to the desktop window. Applications usually use a dialog box to pop up. The main difference between a pop-up window and an overlapping window is that a pop-up window does not need a title or a overlapping window must have a title. When a pop-up window has no title, it can create a borderless window. A pop-up window may have other top-level windows or both. All pop-up windows have the ws_clipsiblings style, even if it is not specified. The pop-up window cannot be created with the value cw_usedefault, regardless of the position or window size. In the pop-up window, cw_usedefault exists, but it does not have any size, capacity, or both. Overlapping windows are usually reserved for the application's main window. In fact, they are also called the main window or framework window. The pop-up window is usually used with the user in the form of dialog box and message box.
A pop-up window is a dialog box for a special type of overlapping window. The message box is used, and a temporary window appears in the main window of other external applications. Select the pop-up window of the title bar. Otherwise, the pop-up window is the same as the ws_overlapped overlapping window.
You can create a pop-up window by specifying the createmediawex ws_popup style. To include a title bar, specify the ws_caption style. Create a pop-up window in the ws_popupwindow style with a border and a window menu. The ws_caption style must be combined with the ws_popupwindow style to make the Window Menu visible.
Subwindow
A child window must have a parent window, which is limited to the customer area of its parent company. This is the main difference between subwindows and overlapping windows and pop-up windows. Parent of Child Window can use top-level window or other child window. The position of the Child Window, from the upper left corner of their parent window, rather than from the upper left side of the screen is the top-level window. The child window is clipped in the customer area of their parents. In the subwindow of the control in a dialog box, its parent company is the dialog box. Subwindow creation cannot be any position or the cw_usedefault value of window size. In the subwindow, cw_usedefault exists, but there is no size or position or both.
There is a child window ws_child style, and it is limited to the customer area of its parent window. Applications usually use child window functional areas to divide them into parent window customer areas. You can create a subwindow by specifying the ws_child style of the createmediawex function.
A child window must have a parent window. A parent window can be an overlapping window, and a window or even a child window appears. Createmediawex is called when you specify the parent window. If you specify the createmediawex ws_child style but do not specify a parent window, the system does not create a window.
One child, but no other features of a window client area, unless explicitly required by them. The application can request a title bar, Window menu, minimize and maximize button, border, scroll window to spend a child, but a subwindow cannot have a menu. If the application specifies a menu handle, or when it registers a child's window class or creates a subwindow, the menu handle is ignored. If no border style is specified, a borderless window is created. Applications can use borderless interfaces to divide the customer partitions in the parent window of a subwindow, while keeping them invisible to users.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.