1 /* 2 * PROJECT: ReactOS Applications 3 * LICENSE: LGPL - See COPYING in the top level directory 4 * FILE: base/applications/msconfig/treeview.h 5 * PURPOSE: Tree-View helper functions. 6 * COPYRIGHT: Copyright 2011-2012 Hermes BELUSCA - MAITO <hermes.belusca@sfr.fr> 7 */ 8 9 #ifndef __TREEVIEW_H__ 10 #define __TREEVIEW_H__ 11 12 #pragma once 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 #include "comctl32supp.h" 19 20 21 // 22 // Should be present in commctrl.h 23 // defined for Windows Vista+ 24 // 25 26 #if (_WIN32_WINNT >= 0x0600) 27 28 #define TVS_EX_MULTISELECT 0x0002 29 #define TVS_EX_DOUBLEBUFFER 0x0004 30 #define TVS_EX_NOINDENTSTATE 0x0008 31 #define TVS_EX_RICHTOOLTIP 0x0010 32 #define TVS_EX_AUTOHSCROLL 0x0020 33 #define TVS_EX_FADEINOUTEXPANDOS 0x0040 34 #define TVS_EX_PARTIALCHECKBOXES 0x0080 35 #define TVS_EX_EXCLUSIONCHECKBOXES 0x0100 36 #define TVS_EX_DIMMEDCHECKBOXES 0x0200 37 #define TVS_EX_DRAWIMAGEASYNC 0x0400 38 39 #endif 40 41 42 #if (_WIN32_WINNT >= 0x0501) 43 44 #define TVM_SETEXTENDEDSTYLE (TV_FIRST + 44) 45 #define TreeView_SetExtendedStyle(hwnd, dw, mask) \ 46 (DWORD)SNDMSG((hwnd), TVM_SETEXTENDEDSTYLE, mask, dw) 47 48 #define TVM_GETEXTENDEDSTYLE (TV_FIRST + 45) 49 #define TreeView_GetExtendedStyle(hwnd) \ 50 (DWORD)SNDMSG((hwnd), TVM_GETEXTENDEDSTYLE, 0, 0) 51 52 #endif 53 54 55 void TreeView_Set3StateCheck(HWND hTree); 56 57 void TreeView_Cleanup(HWND hTree); 58 59 HTREEITEM 60 InsertItem(HWND hTree, 61 LPCWSTR szName, 62 HTREEITEM hParent, 63 HTREEITEM hInsertAfter); 64 65 UINT TreeView_GetRealSubtreeState(HWND hTree, HTREEITEM htiSubtreeItem); 66 void TreeView_PropagateStateOfItemToParent(HWND hTree, HTREEITEM htiItem); 67 void TreeView_DownItem(HWND hTree, HTREEITEM htiItemToDown); 68 void TreeView_UpItem(HWND hTree, HTREEITEM htiItemToUp); 69 HTREEITEM TreeView_GetFirst(HWND hTree); 70 HTREEITEM TreeView_GetLastFromItem(HWND hTree, HTREEITEM hItem); 71 HTREEITEM TreeView_GetLast(HWND hTree); 72 HTREEITEM TreeView_GetPrev(HWND hTree, HTREEITEM hItem); 73 HTREEITEM TreeView_GetNext(HWND hTree, HTREEITEM hItem); 74 75 #ifdef __cplusplus 76 } // extern "C" 77 #endif 78 79 #endif // __TREEVIEW_H__ 80 81 /* EOF */ 82