コード例 #1
0
ファイル: ListViewVS.cs プロジェクト: JBTech/MailSystem.NET
		protected string GetHeaderItemText(int index)
		{
			// I get the bug that I get on the ListView if 
			// I use the columns collection to retreive the text
			// That's why I prefer to use the Windows API

			HDITEM hdi = new HDITEM();
			hdi.mask = HeaderItemFlags.HDI_TEXT;
			hdi.cchTextMax =  BUFFER_SIZE;
			hdi.pszText = Marshal.AllocHGlobal(BUFFER_SIZE);
			WindowsAPI.SendMessage(hHeader, HeaderControlMessages.HDM_GETITEMW, index, ref hdi);
			string text = Marshal.PtrToStringAuto(hdi.pszText);
			return text;
		}
コード例 #2
0
ファイル: WindowsAPI.cs プロジェクト: isaachogue/Archived
 public static extern void SendMessage(IntPtr hWnd, HeaderControlMessages msg, int wParam, ref HDITEM lParam);
コード例 #3
0
ファイル: WindowsAPI.cs プロジェクト: haoasqui/MailSystem.NET
		public static extern void SendMessage(IntPtr hWnd, HeaderControlMessages msg, int wParam, ref HDITEM lParam);