restore the behavior of IncludeWindowStyle, ExcludeWindowStyle, IncludeExWindowStyle, and ExcludeWindowExStyle

This commit is contained in:
Vincent Wei
2020-03-06 17:53:27 +08:00
parent ae56fea196
commit da0cf8be8a
2 changed files with 24 additions and 38 deletions
+16 -10
View File
@@ -7648,8 +7648,10 @@ MG_EXPORT DWORD GUIAPI GetWindowExStyle (HWND hWnd);
* This function removes the specific style of the window
* specified by \a hWnd.
*
* Since 5.0.0, only the customizable window styles (bits in WS_CTRLMASK)
* can be changed by calling this function.
* Note that you should be very careful with changing the styles of a window
* on the fly by calling this function. You are strongly recommended to only
* change the customizable window styles (bits in WS_CTRLMASK) by calling
* this function.
*
* \param hWnd The handle to the window.
* \param dwStyle The specific style which will be removed.
@@ -7667,8 +7669,10 @@ MG_EXPORT BOOL GUIAPI ExcludeWindowStyle (HWND hWnd, DWORD dwStyle);
* This function includes the specific style of the window
* specified by \a hWnd.
*
* Since 5.0.0, only the customizable window styles (bits in WS_CTRLMASK)
* can be changed by calling this function.
* Note that you should be very careful with changing the styles of a window
* on the fly by calling this function. You are strongly recommended to only
* change the customizable window styles (bits in WS_CTRLMASK) by calling
* this function.
*
* \param hWnd The handle to the window.
* \param dwStyle The specific style which will be included.
@@ -7685,9 +7689,10 @@ MG_EXPORT BOOL GUIAPI IncludeWindowStyle (HWND hWnd, DWORD dwStyle);
* This function removes the specific extended style of the window
* specified by \a hWnd.
*
* Since 5.0.0, only the customizable window extended styles (bits in
* WS_EX_CONTROL_MASK | WS_EX_CONTROL_MASK) can be changed by calling
* this function.
* Note that you should be very careful with changing the extended styles of
* a window on the fly by calling this function. You are strongly recommended
* to only change the customizable window styles (bits in
* WS_EX_CONTROL_MASK | WS_EX_CONTROL_MASK) by calling this function.
*
* \param hWnd The handle to the window.
* \param dwStyle The specific extended style which will be removed.
@@ -7704,9 +7709,10 @@ MG_EXPORT BOOL GUIAPI ExcludeWindowExStyle (HWND hWnd, DWORD dwStyle);
* This function includes the specific extended style of the window
* specified by \a hWnd.
*
* Since 5.0.0, only the customizable window extended styles (bits in
* WS_EX_CONTROL_MASK | WS_EX_CONTROL_MASK) can be changed by calling
* this function.
* Note that you should be very careful with changing the extended styles of
* a window on the fly by calling this function. You are strongly recommended
* to only change the customizable window styles (bits in
* WS_EX_CONTROL_MASK | WS_EX_CONTROL_MASK) by calling this function.
*
* \param hWnd The handle to the window.
* \param dwStyle The specific extended style which will be included.
+8 -28
View File
@@ -4989,13 +4989,8 @@ BOOL GUIAPI ExcludeWindowStyle (HWND hWnd, DWORD dwStyle)
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), FALSE);
pWin = MG_GET_WINDOW_PTR (hWnd);
dwStyle &= WS_CTRLMASK;
if (dwStyle) {
pWin->dwStyle &= ~dwStyle;
return TRUE;
}
return FALSE;
pWin->dwStyle &= ~dwStyle;
return TRUE;
}
BOOL GUIAPI IncludeWindowStyle (HWND hWnd, DWORD dwStyle)
@@ -5005,13 +5000,8 @@ BOOL GUIAPI IncludeWindowStyle (HWND hWnd, DWORD dwStyle)
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), FALSE);
pWin = MG_GET_WINDOW_PTR (hWnd);
dwStyle &= WS_CTRLMASK;
if (dwStyle) {
pWin->dwStyle |= dwStyle;
return TRUE;
}
return FALSE;
pWin->dwStyle |= dwStyle;
return TRUE;
}
DWORD GUIAPI GetWindowExStyle (HWND hWnd)
@@ -5031,13 +5021,8 @@ BOOL GUIAPI ExcludeWindowExStyle (HWND hWnd, DWORD dwStyle)
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), FALSE);
pWin = MG_GET_WINDOW_PTR (hWnd);
dwStyle &= (WS_EX_CONTROL_MASK | WS_EX_CONTROL_MASK);
if (dwStyle) {
pWin->dwExStyle &= ~dwStyle;
return TRUE;
}
return FALSE;
pWin->dwExStyle &= ~dwStyle;
return TRUE;
}
BOOL GUIAPI IncludeWindowExStyle (HWND hWnd, DWORD dwStyle)
@@ -5047,13 +5032,8 @@ BOOL GUIAPI IncludeWindowExStyle (HWND hWnd, DWORD dwStyle)
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), FALSE);
pWin = MG_GET_WINDOW_PTR (hWnd);
dwStyle &= (WS_EX_CONTROL_MASK | WS_EX_CONTROL_MASK);
if (dwStyle) {
pWin->dwExStyle |= dwStyle;
return TRUE;
}
return FALSE;
pWin->dwExStyle |= dwStyle;
return TRUE;
}
DWORD GUIAPI GetWindowAdditionalData (HWND hWnd)