次の方法で共有


NonClientView_t::CalcClientRectWithNoScrollBars (Windows Embedded CE 6.0)

1/6/2010

This method determines the size of the client rectangle for a window that does not have a scroll bar.

Syntax

static void CalcClientRectWithNoScrollBars(
  HWND hwnd,
  RECT* lprc,
  DWORD dwStyle,
  DWORD dwExStyle
);

Parameters

  • hwnd
    [in] Handle to the window.
  • lprc
    [in, out] Pointer to a RECT structure that on input specifies the bounding rectangle for a window. On output, the structure contains adjusted values that reflect the size of the client area with no scroll bars.
  • dwStyle
    [in] DWORD that contains a window style that affects the size of the client area. The following table shows the possible values.

    Value Description

    WS_BORDER

    Creates a window that has a thin-line border.

    WS_CAPTION

    Creates a window that has a title bar (includes the WS_BORDER style). Cannot be used with the WS_DLGFRAME style.

    WS_CHILD

    Creates a child window. This style cannot be used with the WS_POPUP style.

    WS_CLIPCHILDREN

    Excludes the area occupied by child windows when drawing occurs within the parent window. Use this style when creating the parent window.

    WS_CLIPSIBLINGS

    Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If WS_CLIPSIBLINGS is not specified and child windows overlap, an application can, when drawing within the client area of a child window, draw within the client area of a neighboring child window. Use this style in combination with the WS_CHILD style only.

    WS_DISABLED

    Creates a window that is initially disabled. A disabled window cannot receive input from the user.

    WS_DLGFRAME

    Creates a window that has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar.

    WS_GROUP

    Specifies the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the WS_GROUP style. The first control in each group usually has the WS_TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys.

    WS_HSCROLL

    Creates a window that has a horizontal scroll bar.

    WS_MAXIMIZE

    Creates a window that is initially maximized.

    WS_MAXIMIZEBOX

    Creates a window that has a Maximize button.

    WS_MINIMIZE

    Creates a window that is initially minimized. Use only with the WS_OVERLAPPED style.

    WS_MINIMIZEBOX

    Creates a window that has a Minimize button.

    WS_OVERLAPPED

    Creates an overlapped window. An overlapped window has a title bar and a border.

    WS_OVERLAPPEDWINDOW

    Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles.

    Ee501788.note(en-US,WinEmbedded.60).gifNote:
    Although WS_OVERLAPPEDWINDOW is not supported in Windows Embedded CE, the functionality can still be achieved by obtaining a bitwise OR of the style flags WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX.

    WS_POPUP

    Creates a pop-up window. This style cannot be used with the WS_CHILD style.

    WS_POPUPWINDOW

    Creates a pop-up window with WS_BORDER, WS_POPUP, and WS_SYSMENU styles. The WS_CAPTION and WS_POPUPWINDOW styles must be combined to make the window menu visible.

    WS_SYSMENU

    Creates a window that has a Close (X) button in the nonclient area.

    WS_TABSTOP

    Specifies a control that can receive the keyboard focus when the user presses the TAB key. Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style.

    WS_THICKFRAME

    Creates a window that has a sizing border.

    WS_VISIBLE

    Creates a window that is initially visible.

    WS_VSCROLL

    Creates a window that has a vertical scroll bar.

  • dwExStyle
    [in] DWORD that contains an extended window style that affects the size of the client area. The following table shows the possible values.

    Value Description

    WS_EX_CLIENTEDGE

    Specifies that a window has a border with a sunken edge.

    WS_EX_CONTEXTHELP

    Includes a question mark in the title bar of the window. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a child window, the child receives a WM_HELP message.

    WS_EX_CONTROLPARENT

    Allows the user to move among the child windows of the window by pressing TAB.

    WS_EX_DLGMODALFRAME

    Creates a window that has a double border; the window can, optionally, be created with a title bar by specifying the WS_CAPTION style in the dwStyle parameter.

    WS_EX_LEFT

    Creates a window that has generic left-aligned properties. Left alignment is the default.

    WS_EX_LEFTSCROLLBAR

    If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the vertical scroll bar (if present) is to the left of the client area. For other languages, the style is ignored.

    WS_EX_LTRREADING

    The window text is displayed using left-to-right reading-order properties. A left-to-right reading order is the default.

    WS_EX_MDICHILD

    Creates an MDI child window.

    WS_EX_NOPARENTNOTIFY

    Specifies that a child window created with this style does not send the WM_PARENTNOTIFY message to its parent window when the child window is created or destroyed.

    WS_EX_OVERLAPPEDWINDOW

    Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles.

    WS_EX_PALETTEWINDOW

    Combines the WS_EX_WINDOWEDGE, WS_EX_TOOLWINDOW, and WS_EX_TOPMOST styles.

    WS_EX_RIGHT

    The window has generic right-aligned properties, which depend on the window class. This style has an effect only if the shell language is Hebrew, Arabic, or another language that supports reading-order alignment; otherwise, the style is ignored.

    WS_EX_RIGHTSCROLLBAR

    The vertical scroll bar is to the right of the client area, if present. This location is the default.

    WS_EX_RTLREADING

    If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the window text is displayed using right-to-left reading-order properties. For other languages, the style is ignored.

    WS_EX_STATICEDGE

    Creates a window with a 3-D border style intended to be used for items that do not accept user input.

    WS_EX_TOOLWINDOW

    Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog box that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by right-clicking or by typing ALT+SPACE.

    WS_EX_TOPMOST

    Specifies that a window created with this style should be placed above all non-topmost windows and should stay above those windows, even when the window is deactivated. To add or remove this style, use the SetWindowPos function.

    WS_EX_TRANSPARENT

    Specifies that a window created with this style should not be painted until siblings beneath the window that were created by the same thread have been painted. The window appears transparent because the bits of underlying sibling windows have already been painted.

    To achieve transparency without these restrictions, use the SetWindowRgn function.

    WS_EX_WINDOWEDGE

    Specifies that a window has a border with a raised edge.

Return Value

None.

Requirements

Header nclientview.hpp
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NonClientView_t
NonClientView_t::CalcClientRectWithHorzScrollBars
NonClientView_t::CalcClientRectWithVertScrollBars
SetWindowPos
SetWindowRgn
RECT
WM_HELP
WM_PAINT