This topic has not yet been rated - Rate this topic

COleControlSite::ModifyStyle

Modifies the styles of the control.

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

The styles to be removed from the current window styles.

dwAdd

The 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.

Nonzero if the styles are changed, otherwise zero.

The control's stock Enabled property will be modified to match the setting for WS_DISABLED. The control's stock Border Style property will be modified to match the requested setting for WS_BORDER. All other styles are applied directly to the control's window handle, if one is present.

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

If nFlags is nonzero, ModifyStyle 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 ModifyStyleEx.

Header: afxocc.h

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ