Windows window style

Source: Internet
Author: User

The form style is often used in the self-painting control. However, this item is too big and there is no need to remember it. So I reprinted an article ....

I. Window Style

Ws_popup pop-up window (it cannot be used together with the ws_childwindow style)
Ws_childwindow subwindow (cannot be used with ws_popup)
Ws_minimize has the minimization button in the creation window.
The ws_minimizebox creation window has a minimal button, and the ws_system style must be specified at the same time.
Ws_visvisible
Ws_disabled unavailable status
Ws_clipsiblings allows the window to exclude the relative areas between subwindows
When ws_clipchildren draws in the parent window, the Child Window area is excluded.
Ws_maximize has the maximum button
The ws_maximizebox creation window has the maximum button. You must specify the ws_system style at the same time.
Ws_caption has a title box and a border (the style is the same as that of ws_tiled)
Ws_border has a single border
Ws_dlgframe has a dialog box border style, without a title box
Ws_vscroll has a vertical scroll bar
Ws_hscroll has a horizontal scroll bar
The ws_sysmenu title box contains a window menu (ws_caption style must be specified)
Ws_thickframe has an adjustable border (same as ws_sizebox)
Ws_tiled and ws_overlapped have the same style.
Ws_tiledwindow and wws_overlappedwindow have the same style
Ws_group group style. The first control of each group has the ws_tabstop style.
Ws_tabstop: The Tab key is acceptable.
Ws_overlapped creates a overlapping window with the title bar and border
Ws_overlappedwindow: ws_overlapped style, ws_caption style, ws_sysmenu Style
Ws_thickframe, ws_minimizebox, and ws_maximizebox
Style combination

 

 

/* Window extension style reference list:
Ws_ex_dlgmodalframe-with double border
Ws_ex_noparentnotify-parent window not notified during creation/destruction
Ws_ex_topmost-top of the window (stay above all non-top Windows)
Ws_ex_acceptfiles-acceptable file drag and drop
Ws_ex_transparent-= & H20 transparent style. This window can be repainted only when the same window has been repainted.
Ws_ex_mdichild-MDI child window style
Ws_ex_toolwindow-toolbar window style
Ws_ex_javaswedge-border with raised edge
Ws_ex_clientedge-shadow edge
Ws_ex_contexthelp-context help style. The title bar contains a question mark
Ws_ex_right-right alignment
Ws_ex_rtlreading-display window text from right to left
Ws_ex_leftscrollbar-vertical scroll bar at the left border of the window
Ws_ex_controlparent-allows you to use the tab key to search between subwindows in the window.
Ws_ex_staticedge-create a 3D Edge when the window is unavailable
Ws_ex_appwindow-place a top-level window on the taskbar when the window is visible
Ws_ex_overlappedwindow-border with a raised edge with a shadow on the edge
Ws_ex_palettewindow-with three-dimensional border, with toolbar window style, the window is on the top
Ws_ex_layered = & h80000 layered or transparent window, this style can use mixed effects
Ws_ex_noinheritlayout-child controls do not inherit the layout of forms or controls
Ws_ex_layoutrtl-the form or control will have a layout from right to left (therefore, it will be mirrored)
Ws_ex_composited-use double buffering to draw all the descendants of the window from bottom to top (WINXP or above)
Ws_ex_noactivate-at the top level but not activated

2. Button Style

Bs_autocheckbox is similar to the check button. Click "select" and click "cancel" again.
Bs_autoradiobutton is similar to the single-choice button. After clicking this button, the selected icon will be moved from other single-choice buttons in the same group to the current option.
Bs_checkbox check button
Bs_defpushbutton is a normal button by default and has a black border.
Bs_groupbox
Bs_lefttext is used with the same single-choice button or check button. The title is displayed on the left.
Bs_ownerdraw allows you to create an owner self-painted button.
Bs_pushbutton normal push button
Bs_radiobutton round radio button
Bs_3state three-state check button. Three States are selected, unselected, and unselected.
Bs_autocheckbox check box, the button status will change automatically
Bs_autoradiobutton circle selection button, the button status will change automatically
Bs_auto3state: the buttons can be selected, unselected, or unselected.
Bs_checkbox check box
Bs_lefttext left-aligned text

3. Rotate button controls

Uds_horz specifies a horizontal rotation button. If this style is not specified, a vertical rotation button is created.
Uds_wrap when the rotation button increases to the maximum value, it is automatically reset to the minimum value. When it is reduced to below the minimum value, it is automatically reset to the maximum value.
Uds_arrowkeys when you press the down or up arrow keys, the rotation button value increases or decreases.
The uds_setbuddyint rotation button automatically updates the value displayed in the partner control. If the partner control accepts the input, you can enter a new rotation button value in the partner control.
The value displayed in the uds_nothousands companion control does not have a thousands separator at every three digits.
Uds_autobuddy automatically enables the rotation button to have a partner control.
The uds_alignright rotation button is on the right side of the partner control.
The uds_alignleft rotation button is on the left side of the partner control.

Iv. Rail bar controls

Tbs_horz specifies a horizontal rail bar. The style is default.
Tbs_vert specifies a vertical rail.
After tbs_autoticks is set in the range, it automatically adds a scale to the rail bar.
The tbs_noticks rail bar has no scale.
Tbs_bottom displays a scale at the bottom of the horizontal rail bar, which can be used with tbs_top.
Tbs_top displays a scale on the top of the horizontal rail bar, which can be used with tbs_bottom.
Tbs_right displays the scale on the right of the vertical rail bar, which can be used with tbs_left.
Tbs_left displays the scale on the left of the vertical rail bar, which can be used with tbs_right.
Tbs_both indicates a scale in the upper, lower, or left and right sides of the rail bar.
Tbs_enableselrange displays a selection range in the rail bar.

5. text editing box style

Es_autohscroll automatically rolls 10 characters to the right after adding a character at the end of the row.
Es_autovscroll automatically rolls up a row when you press Enter.
Es_center is centered.
The es_left character is left aligned.
Es_lowercase is converted to lowercase letters.
Es_multiline allows multiple rows to be displayed.
Es_nohidesel hides the selection of characters when the editing loses focus. After the focus is obtained again, the selected content is displayed in Reversed colors.
Es_oemconvert converts ANSI characters to OEM characters.
Es_password is used to display characters with a star number. It is mostly used to display the password.
Es_right right
Es_uppercase is converted to uppercase letters.
Es_readonly is set to read-only.
Es_wantreturn accepts the Enter key.

6. list box style

Lbs_standard creates a standard list box with border and vertical scroll bars. When the selection changes or the entry is double-clicked, it notifies the parent window of the standard list box. All entries are sorted alphabetically.
Lbs_sort is sorted alphabetically.
Lbs_nosel entries are visible but not optional.
Lbs_notify sends a message to the parent window when you select or double-click a string.
Lbs_disablenoscroll displays a scroll bar that does not work when there are not many entries.
Lbs_multiplesel allows multiple entries.
Lbs_extendedsel multiple entries can be selected by means of shift and mouse or specified key combination.
Lbs_multicolumn allows multiple columns to be displayed.
Lbs_ownerdrawvariable creates an owner drawing list box with different entry heights.
Lbs_ownerdrawfixed creates an owner painting list box with the same entry height.
Lbs_usetabstops allows the use of tab.
Lbs_noredraw: the list is not automatically updated after an entry is added or deleted.
Lbs_hasstrings remembers the strings added to the List.
Lbs_wantkeyboardinput sends the wm_vkeytoitem or wm_chartoitem message to the parent window when a key is pressed.
Lbs_nointegralheight: Create a list box based on the size set by the program.

7. Combo box style

Cbs_autohscroll automatically rolls the text in the edit box to the right when a character is entered at the end of the row.
Cbs_dropdown is similar to cbs_simple, but the drop-down list is displayed only when you click the drop-down icon.
Cbs_dropdownlist is similar to cbs_dropdown, but the editing box for displaying the current option is replaced by a static box.
Cbs_hasstrings: Creates a canvas containing the owner of a project consisting of strings.
Cbs_oemconvert converts the ANSI string in the combo box to an OEM character.
Cbs_ownerdrawfixed: the owner of the drop-down list box is responsible for drawing the content. The height of each item in the list box is the same.
Cbs_ownerdrawvariable: the owner of the drop-down list box is responsible for drawing the content. The height of each item in the list box can be different.
The cbs_simple drop-down list is always displayed.
Cbs_sort Automatically sorts the items in the drop-down list.
Cbs_disablenoscroll: the vertical scroll bar is displayed when the drop-down list shows less content.
When creating a control, cbs_nointegralheight precisely sets the size of the combo box with the specified size.

8. Tree View Controls

Tvs_haslines connects the parent item and child item to clearly display the structure.
Tvs_linesatroot only draws lines at the root.
Tvs_hasbuttons displays a small box with "+" or "-" to indicate whether an item can be expanded or expanded.
The tvs_editlabels user can edit the table item title.
Tvs_showselalways displays the Option Selection status even if the control loses the input focus.
Tvs_disabledragdrop does not support the drag operation.

9. List View Controls

When lvs_alignleft is displayed as a large or small icon, the title is placed on the left of the icon. By default, the title is placed under the icon.
Lvs_aligntop: When the display format is large or small, the title is placed above the icon.
When the display format of lvs_autoarrange is large or small, the table items in the control are automatically arranged.
You can modify the title of lvs_editlabels.
Lvs_icon specifies the large icon display format.
Lvs_list specifies the display format of the List.
Lvs_nocolumnheader does not display the column header in the report format.
When lvs_nolabelwrap is used to display a large image, the title is displayed in a single row. The missing time is displayed in multiple rows.
The lvs_noscroll list view has no scroll bars.
The header of the lvs_nosortheader report list view cannot be used as a sort button.
Lvs_ownerdrawfixed is used by the control owner to draw table items.
Lvs_report specifies the report display format.
Lvs_shareimagelists allows the list view to share the image sequence.
Lvs_showselalways displays the Option Selection status even if the control loses the input focus.
Lvs_singlesel specifies a single-choice list view. You can select multiple options for lack of time.
Lvs_smallicon specifies the small icon display format.
Lvs_sortascending lists table items in ascending order.
Lvs_sortdescending lists table items in descending order.

10. static text box style

The ss_center characters are displayed in the center.
The ss_left character is left aligned.
The ss_leftnoworadwrap character is left aligned and can be used to process TAB characters. line feed is not supported and the character exceeding the end is cropped.
Ss_blackrect: rectangle filled with window border color.
Ss_blsckframe rectangular border, with the same color as the window border.
Ss_grayrect: moment line filled with the screen background color.
Ss_grayframe rectangular border, with the screen background color.
Ss_whiterect uses the moment line filled with the window background color.
Right-aligned ss_right characters
Ss_whiteframe rectangular border, with the background color of the window.

 

 

/* Control style reference list:
The coordinates of the ds_absalign-dialog box are screen coordinates (the default is the client zone coordinates)
Ds_sysmodal-system mode (only 16-bit programs are supported) and cannot be used with ds_control
Ds_localedit-allocate memory to the edit box in the dialog box (only 16-bit programs are supported)
Ds_setfont-customizable dialog box font
Ds_modalframe-frame style (not the same as ws_caption)
Ds_noidlemsg-no idle message
Ds_setforeground-display the dialog box at the beginning
Ds_3dlook-three-dimensional border around
Ds_fixedsys-use the system fixed font
Ds_nofailcreate-ignore errors during creation
Ds_control-control mode, which can be used as a subwindow of other dialog boxes
Ds_center-center the screen
Ds_centermouse-center at the mouse position
Ds_contexthelp-context help button

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.