當前位置:編程學習大全網 - 腳本源碼 - C++ 裏面的ModifyStyleEx()函數的參數是什麽?

C++ 裏面的ModifyStyleEx()函數的參數是什麽?

CWindow::ModifyStyleEx

Modifies the extended window styles of the CWindow object.

BOOL ModifyStyleEx( DWORD dwRemove, DWORD dwAdd,UINT nFlags = 0 );

參數

dwRemove

[in] Specifies the extended styles to be removed during style modification.

dwAdd

[in] Specifies the extended styles to be added during style modification.

nFlags

[in] Window-positioning flags. For a list of possible values, see the SetWindowPos function in the Windows SDK.

返回值

TRUE if the extended window styles are modified; otherwise, FALSE.

註意

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 extended 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 windows using regular window styles, call ModifyStyle.

示例

//The following example attaches an HWND to the CWindow object and

//calls CWindow::ModifyStyleEx() to add and remove the extended

//window styles

CWindow myWindow;

myWindow.Attach(hWnd);

//The following line removes WS_EX_CONTEXTHELP extended style from

//the window and adds WS_EX_TOOLWINDOW extended style to the window

myWindow.ModifyStyleEx(WS_EX_CONTEXTHELP, WS_EX_TOOLWINDOW);

需要頭文件

Header: atlwin.h

參考網址:/netframework/b1y6fbte.aspx

  • 上一篇:如何看待王思聰隨禮30萬?
  • 下一篇:“南昌起義打響第壹槍”指什麽
  • copyright 2024編程學習大全網