From 58cad127dcef9a3904e9ec2cca2c9913566f5172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 16 Aug 2024 18:47:03 +0200 Subject: [PATCH] [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)))