Partager via


COleControlSite::ModifyStyleEx

Modifies the extended styles of the control.

virtual BOOL ModifyStyleEx(
   DWORD dwRemove,
   DWORD dwAdd,
   UINT nFlags 
);

Parameters

  • dwRemove
    The extended styles to be removed from the current window styles.

  • dwAdd
    The extended styles to be added from the current window styles.

  • nFlags
    Window positioning flags. For a list of possible values, see the SetWindowPos function in the Windows SDK.

Return Value

Nonzero if the styles are changed, otherwise zero.

Remarks

The control's stock Appearance property will be modified to match the setting for WS_EX_CLIENTEDGE. All other extended window styles are applied directly to the control's window handle, if one is present.

Modifies the window extended styles of the control site object. Styles to be added or removed can be combined by using the bitwise OR ( | ) operator. See the CreateWindowEx function in the Windows SDK for information about the available window styles.

If nFlags is nonzero, ModifyStyleEx calls the Win32 function SetWindowPos, and redraws the window by combining nFlags with the following four flags:

  • SWP_NOSIZE   Retains the current size.

  • SWP_NOMOVE   Retains the current position.

  • SWP_NOZORDER   Retains the current Z order.

  • SWP_NOACTIVATE   Does not activate the window.

To modify a window's extended styles, call ModifyStyle.

Requirements

Header: afxocc.h

See Also

Concepts

COleControlSite Class

COleControlSite Members

Hierarchy Chart