mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-06 02:01:50 +08:00
tune IncludeWindowStyle, ExcludeWindowStyle, IncludeExWindowStyle, and ExcludeWindowExStyle to not allow change the system styles
This commit is contained in:
@@ -7648,8 +7648,12 @@ 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.
|
||||
*
|
||||
* \param hWnd The handle to the window.
|
||||
* \param dwStyle The specific style which will be removed.
|
||||
*
|
||||
* \return TRUE on success, otherwise FALSE.
|
||||
*
|
||||
* \sa ExcludeWindowStyle
|
||||
@@ -7663,6 +7667,9 @@ 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.
|
||||
*
|
||||
* \param hWnd The handle to the window.
|
||||
* \param dwStyle The specific style which will be included.
|
||||
* \return TRUE on success, otherwise FALSE.
|
||||
@@ -7678,6 +7685,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.
|
||||
*
|
||||
* \param hWnd The handle to the window.
|
||||
* \param dwStyle The specific extended style which will be removed.
|
||||
* \return TRUE on success, otherwise FALSE.
|
||||
@@ -7693,8 +7704,13 @@ 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.
|
||||
*
|
||||
* \param hWnd The handle to the window.
|
||||
* \param dwStyle The specific extended style which will be included.
|
||||
*
|
||||
* \return TRUE on success, otherwise FALSE.
|
||||
*
|
||||
* \sa IncludeWindowStyle
|
||||
|
||||
@@ -4989,8 +4989,13 @@ BOOL GUIAPI ExcludeWindowStyle (HWND hWnd, DWORD dwStyle)
|
||||
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), FALSE);
|
||||
pWin = MG_GET_WINDOW_PTR (hWnd);
|
||||
|
||||
pWin->dwStyle &= ~dwStyle;
|
||||
return TRUE;
|
||||
dwStyle &= WS_CTRLMASK;
|
||||
if (dwStyle) {
|
||||
pWin->dwStyle &= ~dwStyle;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL GUIAPI IncludeWindowStyle (HWND hWnd, DWORD dwStyle)
|
||||
@@ -5000,8 +5005,13 @@ BOOL GUIAPI IncludeWindowStyle (HWND hWnd, DWORD dwStyle)
|
||||
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), FALSE);
|
||||
pWin = MG_GET_WINDOW_PTR (hWnd);
|
||||
|
||||
pWin->dwStyle |= dwStyle;
|
||||
return TRUE;
|
||||
dwStyle &= WS_CTRLMASK;
|
||||
if (dwStyle) {
|
||||
pWin->dwStyle |= dwStyle;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DWORD GUIAPI GetWindowExStyle (HWND hWnd)
|
||||
@@ -5021,8 +5031,13 @@ BOOL GUIAPI ExcludeWindowExStyle (HWND hWnd, DWORD dwStyle)
|
||||
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), FALSE);
|
||||
pWin = MG_GET_WINDOW_PTR (hWnd);
|
||||
|
||||
pWin->dwExStyle &= ~dwStyle;
|
||||
return TRUE;
|
||||
dwStyle &= (WS_EX_CONTROL_MASK | WS_EX_CONTROL_MASK);
|
||||
if (dwStyle) {
|
||||
pWin->dwExStyle &= ~dwStyle;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL GUIAPI IncludeWindowExStyle (HWND hWnd, DWORD dwStyle)
|
||||
@@ -5032,8 +5047,13 @@ BOOL GUIAPI IncludeWindowExStyle (HWND hWnd, DWORD dwStyle)
|
||||
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), FALSE);
|
||||
pWin = MG_GET_WINDOW_PTR (hWnd);
|
||||
|
||||
pWin->dwExStyle |= dwStyle;
|
||||
return TRUE;
|
||||
dwStyle &= (WS_EX_CONTROL_MASK | WS_EX_CONTROL_MASK);
|
||||
if (dwStyle) {
|
||||
pWin->dwExStyle |= dwStyle;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DWORD GUIAPI GetWindowAdditionalData (HWND hWnd)
|
||||
|
||||
Reference in New Issue
Block a user