[SETUP:REACTOS] treelist.h: Fix TreeList_GetStyle/TreeList_SetStyle(Ex) for C language

This commit is contained in:
Hermès Bélusca-Maïto 2024-08-16 18:47:03 +02:00
parent 83d9f6c99b
commit 58cad127dc
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -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)))