public static GetText ( |
||
hWnd | window handle | |
return | string |
public static string GetText(IntPtr hWnd)
{
var title = new StringBuilder();
// Get the size of the string required to hold the window title.
Int32 size = User32Interop.SendMessageIntInt(hWnd, User32Interop.WM_GETTEXTLENGTH, 0, 0).ToInt32();
// If the return is 0, there is no title.
if (size > 0)
{
title = new StringBuilder(size + 1);
User32Interop.SendMessageStringBuilder(hWnd, User32Interop.WM_GETTEXT, title.Capacity, title);
}
return title.ToString();
}
Windows::GetText ( |
/// <summary> /// The search filter changed. Reload the file list /// </summary> /// <param name="sender">event sender</param> /// <param name="e">event args</param> private void SearchFilter_TextChanged(object sender, EventArgs e) { _pageNumber = 0; _pageStartIndex = 0; _fileList = filterFiles(_allFilesList, _includeFileExtensions, _excludeFileExtensions, Windows.GetText(SearchFilter)); refreshFileList(); }