Esempio n. 1
0
 private IntPtr SetItemState(TreeNode node, int state, int stateMask)
 {
     Native.TV_ITEM lti = new Native.TV_ITEM();
     lti.hItem     = node != null ? node.Handle : IntPtr.Zero;
     lti.mask      = Native.TVIF_STATE | Native.TVIF_HANDLE;
     lti.stateMask = stateMask;
     lti.state     = state;
     return(Native.SendMessage(this.Handle, Native.TVM_SETITEM, 0, ref lti));
 }
Esempio n. 2
0
        private int GetItemState(TreeNode node, int stateMask)
        {
            Native.TV_ITEM lti = new Native.TV_ITEM();
            lti.hItem     = node.Handle;
            lti.mask      = Native.TVIF_STATE | Native.TVIF_HANDLE;
            lti.stateMask = stateMask;
            lti.state     = 0;

            Native.SendMessage(this.Handle, Native.TVM_GETITEM, 0, ref lti);
            return(lti.state);
        }