Archive Browser
Download CustomTreeViewLabelEditPart2.zip, last updated 28/10/2013 (14.07 KB)
Download- md5: 84276c0e1d02b4750fc1ecd76d71bedd
using System;
using System.Runtime.InteropServices;
namespace CustomTreeViewLabelEdit
{
internal static class NativeMethods
{
// Extending the LabelEdit functionality of a TreeView to include validation
// http://cyotek.com/blog/extending-the-labeledit-functionality-of-a-treeview-to-include-validation
#region Constants
public const int TVM_GETEDITCONTROL = 0x110F;
public const int WM_SETTEXT = 0xC;
#endregion
#region Class Members
[DllImport("USER32", EntryPoint = "SendMessage", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
[DllImport("USER32", EntryPoint = "SendMessage", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, string lParam);
#endregion
}
}
Donate
This software may be used free of charge, but as with all free software there are costs involved to develop and maintain.
If this site or its services have saved you time, please consider a donation to help with running costs and timely updates.
Donate