https://git.reactos.org/?p=reactos.git;a=commitdiff;h=58cad127dcef9a3904e9e…
commit 58cad127dcef9a3904e9ec2cca2c9913566f5172
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Fri Aug 16 18:47:03 2024 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Tue Aug 27 23:18:07 2024 +0200
[SETUP:REACTOS] treelist.h: Fix TreeList_GetStyle/TreeList_SetStyle(Ex) for C
language
---
base/setup/reactos/treelist.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/base/setup/reactos/treelist.h b/base/setup/reactos/treelist.h
index d5b4969ce84..77545945416 100644
--- a/base/setup/reactos/treelist.h
+++ b/base/setup/reactos/treelist.h
@@ -421,9 +421,15 @@ typedef TVSORTEX TV_SORTEX;
#define TreeList_GetOption(h,i) ((INT )SNDMSG(h,TVM_GETSETOPTION,i,0))
#define TreeList_SetColumnOrderArray(h,n,p) ((BOOL
)SNDMSG(h,TVM_SETCOLUMNORDERARRAY,n,(LPARAM)(p)))
#define TreeList_GetColumnOrderArray(h,n,p) ((BOOL
)SNDMSG(h,TVM_GETCOLUMNORDERARRAY,n,(LPARAM)(p)))
+#ifdef __cplusplus
#define TreeList_GetStyle(h) ((DWORD )::GetWindowLong(h,GWL_STYLE))
#define TreeList_SetStyle(h,d) ((DWORD )::SetWindowLong(h,GWL_STYLE,d))
#define TreeList_SetStyleEx(h,d,m) ((DWORD
)::SetWindowLong(h,GWL_STYLE,((d)&(m))|(::GetWindowLong(h,GWL_STYLE)&~(m))))
+#else
+#define TreeList_GetStyle(h) ((DWORD )GetWindowLong(h,GWL_STYLE))
+#define TreeList_SetStyle(h,d) ((DWORD )SetWindowLong(h,GWL_STYLE,d))
+#define TreeList_SetStyleEx(h,d,m) ((DWORD
)SetWindowLong(h,GWL_STYLE,((d)&(m))|(GetWindowLong(h,GWL_STYLE)&~(m))))
+#endif
#define TreeList_GetItemRect(h,i,s,p,c) (*(HTREEITEM*)p
=(i),(BOOL)SNDMSG(h,TVM_GETITEMRECT,(WPARAM)((c)|(TVIR_COLTOSUB(s))),(LPARAM)(RECT*)(p)))