Beispiel #1
0
        public void SetCheckBoxImageState(TreeNode InTreeNode, UInt32 InImageStateIndex)
        {
            var TreeViewItem = new TreeViewWin32.TVITEM();

            TreeViewItem.hItem     = InTreeNode.Handle;
            TreeViewItem.mask      = TreeViewWin32.TVIF_STATE;
            TreeViewItem.stateMask = TreeViewWin32.TVIS_STATEIMAGEMASK;
            TreeViewItem.state     = InImageStateIndex << 12;         // see INDEXTOSTATEIMAGEMASK
            TreeViewWin32.SendMessage(this.Handle, TreeViewWin32.TVM_SETITEM, IntPtr.Zero, ref TreeViewItem);
        }
Beispiel #2
0
 protected override void OnHandleCreated(EventArgs e)
 {
     TreeViewWin32.SendMessage(this.Handle, TreeViewWin32.TVM_SETEXTENDEDSTYLE, (IntPtr)TreeViewWin32.TVS_EX_DOUBLEBUFFER, (IntPtr)TreeViewWin32.TVS_EX_DOUBLEBUFFER);
     base.OnHandleCreated(e);
 }