Createwindow and createdomainwex

Source: Internet
Author: User
Tags unsupported

Createmediawex function: This function creates a stacked window, pop-up window, or subwindow with an extended style. The other functions are the same as the createwindow function. For details about the creation window and other parameters, see createmediawex.
Function prototype, lpvoidlpparam );
Parameters:
Dwexstyle: Specify the extended window style. This parameter can be of the following values:
Ws_ex_acceptfiles: specifies that a drag-and-drop file is accepted in the window created in this style.
Ws_ex_appwindow: when the window is visible, place a top-level window on the job bar.
Ws_ex_clientedge: specifies that the window has a shadow boundary.
Ws_ex_contexthelp: The title bar of the window contains a question mark. When a user clicks a question mark, the cursor changes to a question mark pointer. If a subwindow is clicked, The subwindow receives the wm_help message. The subwindow should pass the message to the parent window. The parent window then uses the help_wm_help command to call the winhelp function. The help application displays a pop-up window containing the help information of the subwindow. Ws_ex_contexthelp cannot be used together with ws_maximizebox and ws_minimizebox.
Ws_ex_controlparent: allows you to use the tab key to search between subwindows in the window.
Ws_ex_dlgmodalframe: create a window with two sides. You can specify the ws_caption style in dwstyle to create a title bar.
Ws_ex_left: the window has the left alignment attribute, which is set by default.
Ws_ex_leftscrollbar: If the shell language is such as Hebrew, Arabic, or other languages that support reading order alignment, the title bar (if any) is located on the left of the customer area. In other languages, this style is ignored and is not used for error handling.
Ws_ex_ltrreading: The Window text is displayed in the order of left to right (from left to right) attributes. This is set by default.
Ws_ex_mdichild: Create an MD subwindow.
Ws_ex_nopatarentnotify: indicates that the windows created in this style do not send the wm_parentnotfy message to the parent window when they are created or destroyed.
Ws_ex_overlapped: A combination of ws_ex_clientedge and ws_ex_1_wedge.
Ws_ex_palettewindow: ws_ex_shortwedge, ws_ex_toolwindow and ws_wx_topmost combination ws_ex_right: the window has a normal right-aligned attribute, which depends on the window class. This style is valid only when the shell language is such as Hebrew, Arabic, or other languages that support reading order alignment. Otherwise, this flag is ignored and not processed as an error.
Ws_ex_rightscrollbar: specifies the right border of the vertical scroll bar in the window. This is set by default.
Ws_ex_rtlreading: If the shell language is such as Hebrew, Arabic, or other languages that support read order alignment, the window text is from left to right) read order from right to left. In other languages, this style is ignored and is not used for error handling.
Ws_ex_staticedge: Creates a three-dimensional border style for items that do not accept user input.
Ws_ex_toolwidow: create a tool window, that is, the window is a moving tool bar. The title bar of the tool window is shorter than the title bar of the common window, and the title of the window is displayed in a small font. The tool window is not displayed in the taskbar. When you press Alt + TAB, the tool window is not displayed in the dialog box. If a system menu exists in the tool window, its icons are not displayed in the title bar. However, you can right-click or Alt + space to display the menu.
Ws_ex_topmost: indicates that the window created in this style should be placed on top of all non-top windows and stay on its L, even if the window is not activated. Use the setwindowpos function to set and remove this style.
Ws_ex_transparent: specifies that the windows created in this style can be re-painted only when the same windows under the window have been re-painted.
Since the same full day under it has been re-painted, the window is transparent.
Ipclassname: point to an empty ending string or integer atom. If this parameter is an integer, it is the global volume generated by calling the theglobaiaddatom function. The 16-digit value smaller than oxcooo must be the lowest 16-digit value of the ipclassname parameter, and the highest value of this parameter must be o.
If the lpclassname is a string, it specifies the Class Name of the window. This class name can be any class name registered with the registerclassex function, or any predefined control class name. See the list in the description section.
Lpwindowname: A string pointer pointing to an empty end of a specified window name.
If the title bar is specified in the window style, the title of the window directed by lpwindowname is displayed on the title bar. When createwindow is used
You can use lpwindowname to specify the control text when using a function to create controls such as buttons, selection boxes, and static controls.
Dwstyle: Specifies the style of the window to be created. This parameter can be a combination of the following window styles plus the control styles in the description section.
X: see createwindow.
Y: see createwindow.
Nwidth: createwindow.
Nheigth: see createwindow.
Hwndparent: see createwindow.
Hmenu: see createwindow.
Hlnstance: see createwindow.
Lpparam: see createwindow.
Return Value: see createwindow.
Note: See createwindow.
Quick query: Windows NT: 3.1 or later; windows: 95 or later; Windows CE: 1.0 or later; header file: winuser. h; library file: user32.lib; UNICODE: Unicode and ANSI are implemented on Windows NT.

Createwindow function: This function creates a overlapped window, pop-up window, or subwindow. It specifies the window class, window title, window style, and the initial position and size of the window (optional ). This function also specifies the parent window or window (if any) of the window and the menu of the window. To use an extended style that is not supported by the createwindow function, use the createwindow function instead of the createwindow function.
Function prototype: hwnd createwindow (maid, lptstr lpwindowname, DWORD dwstyle, int X, int y, int nwidth, int nheight, hwnd hwndparent, hmenu, handle hlnstance, lpvoid lpparam );
Parameters:
Lpclassname: point to an empty ending string or integer atom. If this parameter is an integer, it is the global volume generated by calling the theglobaladdatom function. The 16-digit value less than 0xc000 must be the 16-digit lower of the parameter value of the lpclassname. The high value of this parameter must be 0.
If the lpclassname is a string, it specifies the Class Name of the window. This class name can be any class name registered with the registerclassex function, or any predefined control class name. See the list in the description section.
Lpwindowname: A string pointer pointing to an empty end of a specified window name.
If the title bar is specified in the window style, the title of the window directed by lpwindowname is displayed on the title bar. When you use the createwindow function to create controls such as buttons, selection boxes, and static controls, you can use lpwindowname to specify the control text.
Dwstyle: Specifies the style of the window to be created. This parameter can be a combination of the following window styles plus the control styles in the description section. Style meaning:
Ws_border: create a single border window.
Ws_caption: create a window with a title box (including the ws_boder style ).
Ws_child: Create a subwindow. This style cannot be used with the ws_popup style.
Ws_chldwindow: Same as ws_child.
Ws_clipchildren: the Child Window area is excluded when drawing in the parent window. Use this style when creating a parent window.
Ws_cllpblings; Exclude the relative areas between subwindows, that is, when a specific window receives the wm_paint message, ws_clipsiblings style will exclude all stacked windows from the drawing, only redraws the specified subwindow. If the ws_clipsiblings style is not specified and the Child Window is stacked, the adjacent child window is re-painted when the customer area of the Child Window is re-painted.
Ws_disabled: Creates a subwindow with the initial status disabled. A window in the prohibited status cannot accept input information from the user.
Ws_dlgframe: Creates a window with the border style of the dialog box. This style of window cannot contain a title bar.
Ws_group: Specifies the first control of a group. This control group consists of the first control and the subsequent control. Each control starts from the second control and has the ws_group style. The first control of each group has the ws_tabstop style, this allows you to move between groups. You can then use the cursor to change the keyboard focus between the controls in the group.
Ws_hscroll: create a window with a horizontal scroll bar.
Ws_iconic: Creates a window with the initial status minimized. The style is the same as that of ws_minimize.
Ws_maximize: create a window with the maximum button. This style cannot appear in the same way as ws_ex_contexthelp. You must also specify the ws_sysmenu style.
Ws_overlapped: generates a stacked window. A stacked window has a title bar and a border. The style is the same as that of ws_tiled.
Ws_overlappedwindow: Creates a stacked window with ws_overlapped, ws_caption, ws_sysmenu ws_thickframe, ws_minimizebox, and ws_maxmizebox styles, which is the same as ws_tiledwindow.
Ws_popup; create a pop-up window. This style cannot be used together with ws_chld.
Ws_popuwindow: create a window with ws_border, ws_popup, ws_sysmenu style. ws_caption and ws_popupwindow must be set at the same time to make a window visible.
Ws_sizebox: create a window with an adjustable border, which is in the same style as ws_thickframe.
Ws_sysmenu: Creates a window with a window menu on the title bar. The ws_caption style must be set at the same time.
Ws_tabstop: Create a control that gets the keyboard focus when you press the tab key. Press the tab key to move the keyboard focus to the next control with the ws_tabstop style.
Ws_thickframe: Creates a window with an adjustable border, which is in the same style as ws_sizebox.
Ws_tiled: generates a stacked window. A stacked window has a title and a border. The style is the same as that of ws_overlapped.
Ws_tiledwindow: Create a ms_overlapped, ws_caption, ws_sysmenu ms_thickframe.
Ws_minimizebox, ws_maxmizebox-style stacked window. The style is the same as that of ws_overlappedwindow.
Ws_visible: create a window in the initial state as visible. Ws_vscroll: create a window with a vertical scroll bar.
X: Specifies the initial horizontal position of the window. For a stacked or pop-up window, the X parameter is the initial X coordinate of the upper left corner of the window in the screen coordinate system. For child rich interfaces, X is the initial X coordinate of the upper left corner of the Child Window relative to the upper left corner of the parent window customer area. If this parameter is set to cw_ucedefault, the system selects the default upper-left coordinate for the window and ignores the y parameter. Cw_usedefault is only valid for stacked windows. If it is set to a pop-up window or a sub-window, the X and Y parameters are set to zero.
Y: Specifies the Initial vertical position of the window. For a stacked or pop-up window Day, the y parameter is the initial y coordinate in the upper left corner of the window in the screen coordinate system. For a child window, Y is the initial y coordinate of the upper left corner of the Child Window relative to the upper left corner of the parent window customer area. For the list box, Y is the initial y coordinate of the upper left corner of the client area of the list box relative to the upper left corner of the parent window. If the stacked window is created using the ws_visible style bit and the X parameter is set to cw_usedefault, the system ignores the y parameter.
Nwidth: Specify the window width in device units. For stacked windows, nwidth, or the window width of the screen coordinate, or cw_usedefault. If nwidth is cw_usedefault, the system selects a default height and width for the window: the default width starts from the initial X coordinate to the right border of the screen, the default height is from the initial X coordinate to the top of the target area. Cw_usedfeault is valid only for the parameter cascade window. If the cw_usedefault flag is set for the pop-up window and subwindow, nwidth and nheight are set to zero.
Nhelght: Specify the window height in units. For stacked windows, nheight is the window width of the screen coordinate. If nwidth is set to cw_usedefault, The nheight parameter is ignored.
Hwndparent: Specifies the end of the parent window or owner window of the created window. To create a subwindow or a owned window, you must provide a valid window handle. This parameter is optional for the pop-up window day. Windows NT 5.0; creates a message window that provides hwnd_message or a handle to an existing message window.
Hmenu: the menu handle, or a subwindow identifier based on the window style. For stacked or pop-up windows, hmenu specifies the menu used by the window: If the menu class is used, hmenu can be null. For a subwindow, hmenu specifies the subwindow identifier (an integer). A dialog box uses this integer value to notify the parent class of the event. The application determines the Child Window identifier. This value must be unique for all child windows with the same parent window.
Hlnstance: handle of the module case associated with the window.
Lpparam: pointer to a value, which is passed to the window wm_create message. This value is passed through the createstruct structure in the iparam parameter. If the application calls createwindow to create an MDI client window, lpparam must point to a clientcreatestruct structure.
Return Value: If the function succeeds, the return value is the new window handle. If the function fails, the return value is null. To obtain more error information, call the getlasterror function.
Note: before return, createwindow sends a wm_create message to the window process. For cascade, pop-up, And subwindows, createwindow sends wm_create, wm_getminmaxinfo, and wm_nccreate messages to the window. The iparam parameter of the message wm_create contains a pointer to the createstruct structure. If the ws_visible style is specified, createwindow sends all messages to the window that need to be activated and displayed.
Obtain the control information about whether the task bar is a button in the created window. For more information, see the visbility of the taskbar button.
The following predefined control classes can be specified in the lpclassname parameter. Note the corresponding control style that can be used in the dwstyle parameter.
The button is a small rectangle subwindow. You can click it to open or close it. Button control can be used independently or included in a group. You can write or not write tags for the control. When a user clicks a button to control it, the appearance of the button changes significantly. See button. To view the button style table specified in the dwstyle parameter, see button style.
The ComboBox combo box consists of a list box and a selection field similar to the editing control. When you use this style control, the application can always display the list box or make it into a drop-down list. If the list box is visible, the input characters in the editing domain are highlighted in the first domain consistent with the characters in the list box. Otherwise, the items selected in the list box are displayed in the editing domain. See combo boxes.
For details about how to view the combox style table specified in the dwstyle parameter, see combo boxes style.
In the edit box, you can enter text on the keyboard in a small rectangle subwindow. You can click or press the tab key to select the edit box control and focus the control. You can enter text when a blinking insert mark is displayed in the edit box. Move the cursor with the mouse, select the character to be replaced, set the position of the inserted character, or use the return key to delete the character. See edit. Controls.
For details about how to view the table in the edit box style specified in the dwstyle parameter, see edit control style.
List of strings in The ListBox list box. When an application must display a list of names, such as a list of file names, you can specify a list box when selecting a list. You can click to select a name. When selected, the selected name is highlighted and a notification message is sent to the parent window. See list box style. To view the list style table specified in the dwstyle parameter, see list box control style.
The mdiclient MDI customer designs the MDI customer window. The window receives messages that control the Child Window of the MDI application. Two control style bits are recommended: ws_clipchildren and ws_child. The ws_hscroll and ws_vscroll-style MDI customer Windows allow users to slide the MDI child windows into the windows. See MDI.
RichEdit designs a control for rich editl.0. This control allows you to view and edit text in character and paragraph formats and include embedded COM objects. See Rich edit controls. For details about how to view the RichEdit style table specified in the dwstyle parameter, see list box control style.
RichEdit class design a control of rich edik2.0. This control allows you to view and edit text in character and paragraph formats and include embedded COM objects. See richeditcontrols. For details about how to view the RichEdit style table specified in the dwstyle parameter, see richeditcontroistyle.
A scroll bar is designed with a scroll box and a rectangle with an arrow at both ends. As long as you click control, the scroll bar sends a notification message to the parent window. If necessary, the parent window updates the position of the scroll bar. See scrollbars. To view the scroll bar style table specified in the dwstyle parameter, see scroll bars style.
Static is a simple static text field. text boxes or rectangles are used to add tags to controls, combine controls, or separate controls from other controls.
Static Control does not provide input or output. See static control styles. To view the static text style table specified in the dwstyle parameter, see scroll bars style.
Windows 95: The system supports a maximum of 16,364 window handles.
Note: If Windows 4.x is specified when you connect to an application, window control is not subject to title control unless there is a window ticket in the application window. This requirement does not apply to Windows 3.x.
Windows CE: createwindow is implemented in the macro mode. It is defined as createdomainwex, And the dwexstyle parameter is set to a long integer 0. Menu Bar control is not supported. unless declared as a subwindow flag, the hmenu parameter must be null. The mdiclient window class is not supported. The dwstyle parameter can be a combination of the window style and control style in the dialog box (dialogue box), window (Windows), and control (Controls) files.
The following dwstyle flag is not supported in the window:
Ws_childwindow ws_iconc; ws_maxmize ws_maximizebox; ws_minimize ws_minimizebox;
Ws_overlappedwindow ws_popupwindow; ws_sizeboxws_thickframe ws_tiled ws_tiledwindow
The following dwstyle flag is not supported in the control and dialog box:
Unsupported button style and static control style:
Bs_lefttext ss_blackframe; bs_multiline ss_grayframe bs_text ss_metapict; bs_userbutton ss_simple
The ss_whiterect style in the composite box is not supported.
Cbs_ownerdrawfixed ss_blackrect; cbs_ownwedrawvariable ss_grayrect; cbs_simple8r old htrimage
The ss_whiteframe style cannot be controlled in the list box.
Lbs_nodata
Unsupported dialog box style:
Lbs_ownerdrawfixed ds_absalign; lbs_ownerdrawvariable ds_centermouse; lbs_standard ds_contexthelp
The ds_fixedsys style of the scroll bar is not supported.
Sbs_bottomalign ds_nofailcreate; sbs_rightalign ds_noidlemsg;
Sbs_slzeboxbott0mrihtalign ds_sysmodal; sbs_sizegrip
The bs_ownerdraw style can be used to replace the bs_userbutton style.
The ss_left or ss_leftnowordwrap style can be used to replace the static ss_simple style.
The mdiclient window class is not supported.
All windows have the ws_clipsiblings and ws_clipchildren styles.
Windows ce1.0 does not support Windows except the dialog box. If the hwndparent parameter is not null, the window contains the ws_child style. Windows ce1.0 does not support menu entries.

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.