A window can have a combination of styles; an application can combine styles by using the bitwise inclusive OR operator. An application usually sets the window styles when it creates the window. The OS/2 operating system provides several standard window styles that apply to all windows. It also provides many styles for the predefined frame and control windows. The frame and control styles are unique to each predefined window class and can be used only for windows of the corresponding class.
Initially, the styles of the window class used to create the window determine the styles of the new window. For example, if the window class has the style CS_SYNCPAINT, all windows created using that class, by default, will have the window style WS_SYNCPAINT. The OS/2 operating system has the following standard window styles:
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³Style Name ³Description ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³WS_CLIPCHILDREN ³Prevents a window from painting over its ³ ³ ³child windows. This style increases the time ³ ³ ³necessary to calculate the visible region. ³ ³ ³This style is usually not necessary because ³ ³ ³if the parent and child windows overlap and ³ ³ ³both are invalidated, the system draws the ³ ³ ³parent window before drawing the child ³ ³ ³window. If the child window is invalidated ³ ³ ³independently of the parent window, the ³ ³ ³system redraws only the child window. If the ³ ³ ³update region of the parent window does not ³ ³ ³intersect the child window, drawing the ³ ³ ³parent window causes the child window to be ³ ³ ³redrawn. This style is useful to prevent a ³ ³ ³child window that contains a complex graphic ³ ³ ³from being redrawn unnecessarily. ³ ³ ³WS_CLIPCHILDREN is an absolute requirement if³ ³ ³a window with children ever performs output ³ ³ ³in response to any message other than ³ ³ ³WM_PAINT. Only WM_PAINT processing is ³ ³ ³synchronized such that the children will get ³ ³ ³their messages after the parent. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³WS_CLIPSIBLINGS ³Prevents a window from painting over its ³ ³ ³sibling windows. This style protects sibling ³ ³ ³windows but increases the time necessary to ³ ³ ³calculate the visible region. This style is ³ ³ ³appropriate for windows that overlap and that³ ³ ³have the same parent window. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³WS_DISABLED ³Used by an application to disable a window. ³ ³ ³It is up to the window to recognize this ³ ³ ³style and reject input. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³WS_GROUP ³Specifies the first control of a group of ³ ³ ³controls in which the user can move from one ³ ³ ³control to the next by using the ARROW keys. ³ ³ ³All controls defined after the control with ³ ³ ³the WS_GROUP style belong to the same group. ³ ³ ³The next control with the WS_GROUP style ends³ ³ ³the first group and starts a new group. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³WS_MAXIMIZED ³Enlarges a window to the maximum size. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³WS_MINIMIZED ³Reduces a window to the size of an icon. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³WS_PARENTCLIP ³Extends a window's visible region to include ³ ³ ³that of its parent window. This style ³ ³ ³simplifies the calculation of the child ³ ³ ³window's visible region but is potentially ³ ³ ³dangerous because the parent window's visible³ ³ ³region is usually larger than the child ³ ³ ³window. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³WS_SAVEBITS ³Saves the screen area under a window as a bit³ ³ ³map. When the user hides or moves the window,³ ³ ³the system restores the image by copying the ³ ³ ³bits; there is no need to add the area to the³ ³ ³uncovered window's update region. The style ³ ³ ³can improve system performance but also can ³ ³ ³consume a great deal of memory. It is ³ ³ ³recommended only for transient windows, such ³ ³ ³as menus and dialog windows, not for main ³ ³ ³application windows. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³WS_SYNCPAINT ³Causes a window to receive WM_PAINT messages ³ ³ ³immediately after a part of the window ³ ³ ³becomes invalid. Without this style, the ³ ³ ³window receives WM_PAINT messages only if no ³ ³ ³other message is waiting to be processed. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³WS_TABSTOP ³Specifies one of any number of controls ³ ³ ³through which the user can move by tabbing. ³ ³ ³Pressing the TAB key moves the keyboard focus³ ³ ³to the next control that has the WS_TABSTOP ³ ³ ³style. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³WS_VISIBLE ³Makes a window visible. The operating system ³ ³ ³draws the window on the screen unless ³ ³ ³overlapping windows completely obscure it. ³ ³ ³Windows without this style are hidden. If ³ ³ ³overlapping windows completely obscure the ³ ³ ³window, the window is still considered ³ ³ ³visible. (Visibility means that the ³ ³ ³operating system draws the window if it can.)³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ