internal static extern int SendMessage(HandleRef hWnd, APIsEnums.HeaderControlMessages msg, IntPtr wParam, ref APIsStructs.HDITEM lParam);
/// <summary> /// Get HeaderItem text /// </summary> /// <param name="index"></param> /// <returns></returns> public string GetHeaderItemText(int index) { APIsStructs.HDITEM hdi = new APIsStructs.HDITEM(); hdi.mask = APIsEnums.HeaderItemFlags.TEXT; hdi.cchTextMax = 255; hdi.pszText = Marshal.AllocHGlobal(255); APIsUser32.SendMessage(Handle, APIsEnums.HeaderControlMessages.GETITEMW, index, ref hdi); string text = Marshal.PtrToStringAuto(hdi.pszText); return text; }
public static extern int SendMessage(IntPtr hWnd, APIsEnums.HeaderControlMessages msg, int wParam, ref APIsStructs.HDITEM lParam);