[Mwinapi-commits] SF.net SVN: mwinapi:[136] trunk/ManagedWinapi/Windows/SystemWindow.cs
Status: Beta
Brought to you by:
schierlm
From: <sch...@us...> - 2015-12-11 17:45:27
|
Revision: 136 http://sourceforge.net/p/mwinapi/code/136 Author: schierlm Date: 2015-12-11 17:45:25 +0000 (Fri, 11 Dec 2015) Log Message: ----------- added ToString() to SystemWindow -> now the debugger shows the HWND in watch-window % pushed from GitHub % Author: fk <enoon1 at arcor.de> % Date: Fri Dec 11 14:57:00 2015 +0100 Modified Paths: -------------- trunk/ManagedWinapi/Windows/SystemWindow.cs Modified: trunk/ManagedWinapi/Windows/SystemWindow.cs =================================================================== --- trunk/ManagedWinapi/Windows/SystemWindow.cs 2015-12-11 17:45:18 UTC (rev 135) +++ trunk/ManagedWinapi/Windows/SystemWindow.cs 2015-12-11 17:45:25 UTC (rev 136) @@ -347,7 +347,7 @@ public static SystemWindow[] FilterToplevelWindows(Predicate<SystemWindow> predicate) { List<SystemWindow> wnds = new List<SystemWindow>(); - EnumWindows(new EnumWindowsProc(delegate(IntPtr hwnd, IntPtr lParam) + EnumWindows(new EnumWindowsProc(delegate (IntPtr hwnd, IntPtr lParam) { SystemWindow tmp = new SystemWindow(hwnd); if (predicate(tmp)) @@ -470,7 +470,7 @@ public SystemWindow[] FilterDescendantWindows(bool directOnly, Predicate<SystemWindow> predicate) { List<SystemWindow> wnds = new List<SystemWindow>(); - EnumChildWindows(_hwnd, delegate(IntPtr hwnd, IntPtr lParam) + EnumChildWindows(_hwnd, delegate (IntPtr hwnd, IntPtr lParam) { SystemWindow tmp = new SystemWindow(hwnd); bool add = true; @@ -491,6 +491,17 @@ public IntPtr HWnd { get { return _hwnd; } } /// <summary> + /// Returns a <see cref="System.String" /> that represents this instance. + /// </summary> + /// <returns> + /// A <see cref="System.String" /> that represents this instance. + /// </returns> + public override string ToString() + { + return "HWND 0x" + _hwnd.ToString("X"); + } + + /// <summary> /// The title of this window (by the <c>GetWindowText</c> API function). /// </summary> public string Title This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |