Windows Common window styles and control styles

First, the window style

WS_POPUP pop-up window (can not be used with WS_CHILDWINDOW style while)
WS_CHILDWINDOW child windows (can not be combined with WS_POPUP)
WS_MINIMIZE create window has a minimize button
WS_MINIMIZEBOX create window has a minimize button, must specify WS_SYSTEM style
WS_VISIBLE visible
WS_DISABLED not a state
WS_CLIPSIBLINGS opposing area between the window to exclude the child window
WS_CLIPCHILDREN when drawing within the parent window, child window exclusion region
WS_MAXIMIZE having a maximize button
WS_MAXIMIZEBOX has created a window maximize button styles to be specified while WS_SYSTEM
WS_CAPTION frame and a header frame (the same style and WS_TILED)
the WS_BORDER single border
dialog style WS_DLGFRAME band, without letterbox
WS_VSCROLL vertical scrollbar
WS_HSCROLL horizontal scroll bar
window menu with the title frame WS_SYSMENU (WS_CAPTION be specified style)
the WS_THICKFRAME adjustable frame (WS_SIZEBOX the same style)
same WS_TILED style and WS_OVERLAPPED
WS_TILEDWINDOW the same style WWS_OVERLAPPEDWINDOW
WS_GROUP set of styles, the first control in each group have WS_TABSTOP style
WS_TABSTOP acceptable TAB key
WS_OVERLAPPED create an overlay window with title bar and borders
WS_OVERLAPPEDWINDOW namely: WS_OVERLAPPED style, WS_CAPTION style, WS_SYSMENU style
                  WS_THICKFRAME style , WS_MINIMIZEBOX style and WS_MAXIMIZEBOX
                    style combination

 

 

/ * Window Extended Style reference list:
WS_EX_DLGMODALFRAME - with double border
without notifying the parent window when you create / destroy - the WS_EX_NOPARENTNOTIFY
WS_EX_TOPMOST - window on top (to stay on top of all the non-highest level of the window)
WS_EX_ACCEPTFILES - Acceptable drop files
WS_EX_TRANSPARENT - = & H20 transparent pattern, belong in the window is redrawn when the window will not be redrawn
WS_EX_MDICHILD - MDI child window style
WS_EX_TOOLWINDOW - tool windows style
WS_EX_WINDOWEDGE - with raised edge border
WS_EX_CLIENTEDGE - the edge of the shadowed
WS_EX_CONTEXTHELP - have context help style, the title bar contains a question mark
WS_EX_RIGHT - align Right
WS_EX_RTLREADING - window display text from right to left
WS_EX_LEFTSCROLLBAR - left border of the vertical scroll bar in the window
WS_EX_CONTROLPARENT - TAB key allows the user to search sub-window between the window
WS_EX_STATICEDGE - When creating a three-dimensional edge of the window when the unavailable state
WS_EX_APPWINDOW - when the window is visible the top window is placed on a taskbar on
WS_EX_OVERLAPPEDWINDOW - with raised edge border edge shadow
WS_EX_PALETTEWINDOW - with solid border, with a window styles toolbar, a window in the top
WS_EX_LAYERED = & H80000 layered or transparent window, this style can be mixed effects
WS_EX_NOINHERITLAYOUT - child window control does not inherit or layout control
WS_EX_LAYOUTRTL - form or control having a right to left layout (and thus will be mirrored)
WS_EX_COMPOSITED - all descendant draw a window with double buffering from the bottom (WinXP above)
WS_EX_NOACTIVATE - but do not activate at the top level


Second, button style 
    
BS_AUTOCHECKBOX with similar check button, click to select, click again to cancel.
BS_AUTORADIOBUTTON with similar radio button, click the check mark from the current option to move to other radio buttons at the group.
BS_CHECKBOX check button
BS_DEFPUSHBUTTON default push button, with a darker border.
BS_GROUPBOX packet block
BS_LEFTTEXT with a radio button or check buttons used in conjunction with the title displayed on the left.
BS_OWNERDRAW owner can create a self-drawn button.
Common push button BS_PUSHBUTTON
BS_RADIOBUTTON circular radio button
BS_3STATE three-state check button, i.e. three states: checked, unchecked, undetermined
BS_AUTOCHECKBOX check boxes, will automatically change the status button
round selection button, the button state is automatically BS_AUTORADIOBUTTON changing
BS_AUTO3STATE button has three states that is allowed: checked, unchecked, undetermined
BS_CHECKBOX check boxes
BS_LEFTTEXT left-justified text

III spin button control

UDS_HORZ specify a horizontal rotary button. If not specify this style create a vertical spin button.
When the spin button when UDS_WRAP increases to exceed the maximum value, is automatically reset to a minimum value, when reduced to below a minimum value, it is automatically reset to the maximum.
UDS_ARROWKEYS When the user presses the up or down arrow key, the rotation increment or decrement the value of the button.
UDS_SETBUDDYINT Rotate button will automatically update the value displayed buddy control, if the buddy control can accept input, you can enter a new value in the spin button partners control.
Displayed value every three UDS_NOTHOUSANDS partner control not thousands separator.
UDS_AUTOBUDDY automatic rotation button has a buddy control.
UDS_ALIGNRIGHT rotary button to the right partners in control.
Spin button in the left UDS_ALIGNLEFT partners control.

Fourth, the track bar control

TBS_HORZ specify a horizontal track bar. The style is the default.
TBS_VERT specifies a vertical track bar.
After TBS_AUTOTICKS range setting track bar scale is automatically added.
TBS_NOTICKS track bar without scale.
TBS_BOTTOM displayed at the bottom of the scale of the horizontal track bars, it may be used with TBS_TOP.
TBS_TOP displayed at the top of the scale of the horizontal track bars, may be used with TBS_BOTTOM.
TBS_RIGHT scale displayed on the right side of the vertical rail bars, may be used with TBS_LEFT.
TBS_LEFT scale displayed on the left side of the vertical rail bars, it may be used with TBS_RIGHT.
TBS_BOTH scale are displayed in the vertical portion of the left and right rails or strips.
TBS_ENABLESELRANGE displays a range of options in the track bar.

Fifth, the text edit box style

ES_AUTOHSCROLL when the line automatically scrolls 10 characters to the right tail add a character.
Automatic roller ES_AUTOVSCROLL input line when the carriage.
ES_CENTER character centered.
ES_LEFT character left aligned.
ES_LOWERCASE unified converted to lowercase.
ES_MULTILINE allow multi-line display.
ES_NOHIDESEL hide the selected character when the editor loses focus, regain focus after displaying the selected content in reverse.
ES_OEMCONVERT the ANSI character into OEM characters.
ES_PASSWORD display characters with an asterisk, for more than echo the password.
ES_RIGHT character right aligned
ES_UPPERCASE unified into capital letters.
ES_READONLY character set to read-only.
Enter to enter ES_WANTRETURN accepted.

Sixth, the list box style 
    
LBS_STANDARD create a boundary and having a vertical scroll bar, or when the selection change can be notified of the entry is double the standard list box of the parent window. All entries sorted alphabetically.
LBS_SORT sorted alphabetically.
LBS_NOSEL entries visible but not selectable.
LBS_NOTIFY When the user selects a string or double-click, a notification message is sent parent window.
LBS_DISABLENOSCROLL still show the scroll bar does not work when few entries.
LBS_MULTIPLESEL allows entry multiple selections.
LBS_EXTENDEDSEL available mouse and specified SHIFT key combination or by selecting a plurality of entries.
LBS_MULTICOLUMN allow multi-column display.
LBS_OWNERDRAWVARIABLE create an owner draw listbox entry can be highly different.
LBS_OWNERDRAWFIXED create a highly entries have the same owner draw list box.
LBS_USETABSTOPS allowed TAB tabs.
When an entry is not updated automatically LBS_NOREDRAW list display after being deletions.
LBS_HASSTRINGS the memory added to the list of strings.
LBS_WANTKEYBOARDINPUT sent when a key is pressed or WM_CHARTOITEM WM_VKEYTOITEM message to the parent window.
LBS_NOINTEGRALHEIGHT according to the procedure set size to create a list box.

Seven, the combo box style

CBS_AUTOHSCROLL will automatically scroll the text edit box to the right end of the line when entering characters.
CBS_DROPDOWN with CBS_SIMPLE style is similar, but will only show a drop-down list when the user clicks the drop-down icon.
CBS_DROPDOWNLIST similar with CBS_DROPDOWN, just edit box displays the current option is replaced by a static frame.
CBS_HASSTRINGS create a drawing that contains the owner of a string consisting of a combo box items.
CBS_OEMCONVERT the ANSI string combo box into OEM characters.
CBS_OWNERDRAWFIXED responsible for the content drawn by the owner of the drop-down list box; each item in the list box the same height.
CBS_OWNERDRAWVARIABLE responsible for the content drawn by the owner of the drop-down list box; each item in the list box height can be different.
CBS_SIMPLE drop-down list is always displayed.
CBS_SORT automatically sort the items in the drop-down list.
When the drop-down list CBS_DISABLENOSCROLL display content is too small vertical scroll bar.
When the control is created CBS_NOINTEGRALHEIGHT to precisely set the specified size combo box size.

Eight, the tree view control

TVS_HASLINES between parent and child connections to clearly show the structure.
TVS_LINESATROOT only the root objects.
TVS_HASBUTTONS shown with "+" or - to identify a specific small box can be unfolded or expanded "."
TVS_EDITLABELS user can edit the title entry.
TVS_SHOWSELALWAYS even control loses the input focus, still shows the status of the item selected.
TVS_DISABLEDRAGDROP does not support the drag operation.

Nine, the list view control


LVS_ALIGNLEFT when the display format is large or small icons, the icon on the left of the title. By default title placed below the icon.
LVS_ALIGNTOP when the display format is large or small icons, the icon title on the top.
LVS_AUTOARRANGE When the display format is large or small icons, automatic entry in the control arrangement.
LVS_EDITLABELS user can modify the title.
LVS_ICON large icons display the specified format.
LVS_LIST specified list display format.
LVS_NOCOLUMNHEADER no header is listed in the report format.
When LVS_NOLABELWRAP when the display format is a large icon, the title single-line display. The default is a multi-line display.
LVS_NOSCROLL list view without scrolling.
Header LVS_NOSORTHEADER report list view can not be used as a sort button.
LVS_OWNERDRAWFIXED the responsibility of the owner controls draw entries.
LVS_REPORT specify the report format.
LVS_SHAREIMAGELISTS shared list view so that the image sequence.
LVS_SHOWSELALWAYS even control loses the input focus, still shows the status of the item selected.
LVS_SINGLESEL specify a single select list view. You can select a number of default.
LVS_SMALLICON specify a small icon display format.
LVS_SORTASCENDING ascending row list items.
LVS_SORTDESCENDING ranked in descending order list items.

Ten, static text box style

SS_CENTER character centered.
SS_LEFT character left aligned.
SS_LEFTNOWORADWRAP character left-aligned, tabs may be processed TAB does not support wrap over the end of the character is cut.
SS_BLACKRECT with window border colors filled rectangle.
SS_BLSCKFRAME rectangular frame, and the window frame of the same color.
SS_GRAYRECT filled with the background color of the screen rows moment.
SS_GRAYFRAME rectangular frame, using the screen background color.
SS_WHITERECT filled with the background color of the window row moment.
SS_RIGHT character right-aligned
SS_WHITEFRAME bounding rectangle, using the window background color.

 

 

/ * Control Style reference list:
DS_ABSALIGN - coordinates of the dialog screen coordinates (default client coordinates)
DS_SYSMODAL - system mode (supports only 16-bit programs), the same can not be DS_CONTROL with
DS_LOCALEDIT - inside of a dialog box to edit allocate memory (supports only 16-bit programs)
DS_SETFONT - customizable font dialog
DS_MODALFRAME - frame styles (not with the use of WS_CAPTION)
DS_NOIDLEMSG - no idle message
DS_SETFOREGROUND - the dialog box displayed in the forefront
DS_3DLOOK - surrounded by a 3-dimensional border
DS_FIXEDSYS - use the system fixed font
DS_NOFAILCREATE - ignore create errors during
DS_CONTROL - control mode, as other dialog child windows
DS_CENTER - is centered on screen
is centered in the mouse position - DS_CENTERMOUSE
DS_CONTEXTHELP - have contextual help button

 

 

This information is taken from: https: //www.cnblogs.com/findumars/p/3520676.html

Guess you like

Origin www.cnblogs.com/damoncc/p/12061714.html