
If no border style is specified, the system creates a borderless window. 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. 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 you specify the WS_CHILD style in CreateWindowEx but do not specify a parent window, the system does not create the window.Ī child window has a client area but no other features, unless they are explicitly requested. You specify the parent window when you call CreateWindowEx. The parent window can be an overlapped window, a pop-up window, or even another child window. You create a child window by specifying the WS_CHILD style in the CreateWindowEx function.Ī child window must have a parent window.
Popup window styles windows#
An application typically uses child windows to divide the client area of a parent window into functional areas. Child WindowsĪ child window has the WS_CHILD style and is confined to the client area of its parent window. The WS_CAPTION style must be combined with the WS_POPUPWINDOW style to make the window menu visible. Use the WS_POPUPWINDOW style to create a pop-up window that has a border and a window menu. To include a title bar, specify the WS_CAPTION style.

You create a pop-up window by specifying the WS_POPUP style in CreateWindowEx. Title bars are optional for pop-up windows otherwise, pop-up windows are the same as overlapped windows of the WS_OVERLAPPED style. Pop-up WindowsĪ 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. If you use the WS_OVERLAPPEDWINDOW style, the window has a title bar, sizing border, window menu, and minimize and maximize buttons. If you use the WS_OVERLAPPED style, the window has a title bar and border. An overlapped window used as a main window typically includes all of these components.īy specifying the WS_OVERLAPPED or WS_OVERLAPPEDWINDOW style in the CreateWindowEx function, an application creates an overlapped window.

It can also have a window menu, minimize and maximize buttons, and scroll bars. This section contains the following topics that describe window types.Īn overlapped window is a top-level window (non-child window) that has a title bar, border, and client area it is meant to serve as an application's main window.
