summaryrefslogtreecommitdiff
path: root/redo/tab_windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'redo/tab_windows.c')
-rw-r--r--redo/tab_windows.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/redo/tab_windows.c b/redo/tab_windows.c
index 791e115..4958a68 100644
--- a/redo/tab_windows.c
+++ b/redo/tab_windows.c
@@ -80,3 +80,27 @@ LONG tabGetTabHeight(HWND hwnd)
}
return tallest;
}
+
+void tabEnterChildren(HWND hwnd)
+{
+ DWORD style, xstyle;
+
+ style = (DWORD) GetWindowLongPtrW(hwnd, GWL_STYLE);
+ xstyle = (DWORD) GetWindowLongPtrW(hwnd, GWL_EXSTYLE);
+ style &= ~((DWORD) WS_TABSTOP);
+ xstyle |= WS_EX_CONTROLPARENT;
+ SetWindowLongPtrW(hwnd, GWL_STYLE, (LONG_PTR) style);
+ SetWindowLongPtrW(hwnd, GWL_EXSTYLE, (LONG_PTR) xstyle);
+}
+
+void tabLeaveChildren(HWND hwnd)
+{
+ DWORD style, xstyle;
+
+ style = (DWORD) GetWindowLongPtrW(hwnd, GWL_STYLE);
+ xstyle = (DWORD) GetWindowLongPtrW(hwnd, GWL_EXSTYLE);
+ style |= WS_TABSTOP;
+ xstyle &= ~((DWORD) WS_EX_CONTROLPARENT);
+ SetWindowLongPtrW(hwnd, GWL_STYLE, (LONG_PTR) style);
+ SetWindowLongPtrW(hwnd, GWL_EXSTYLE, (LONG_PTR) xstyle);
+}