mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Code cleanup, already made some changes (which are not active) for the next release so I can work on them without having multiple changed files which might cause check in conflicts.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2359 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
70d6b0356b
commit
82eddefe4e
5 changed files with 435 additions and 318 deletions
|
@ -567,9 +567,7 @@ namespace GreenshotPlugin.Core {
|
|||
public string ClassName {
|
||||
get {
|
||||
if (className == null) {
|
||||
StringBuilder classNameBuilder = new StringBuilder(260, 260);
|
||||
User32.GetClassName(this.hWnd, classNameBuilder, classNameBuilder.Capacity);
|
||||
className = classNameBuilder.ToString();
|
||||
className = GetClassName(this.hWnd);
|
||||
}
|
||||
return className;
|
||||
}
|
||||
|
@ -1394,7 +1392,18 @@ namespace GreenshotPlugin.Core {
|
|||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the classname for a hWnd
|
||||
/// </summary>
|
||||
/// <param name="hWnd">IntPtr with the windows handle</param>
|
||||
/// <returns>String with ClassName</returns>
|
||||
public static String GetClassName(IntPtr hWnd) {
|
||||
StringBuilder classNameBuilder = new StringBuilder(260, 260);
|
||||
User32.GetClassName(hWnd, classNameBuilder, classNameBuilder.Capacity);
|
||||
return classNameBuilder.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all the visible top level windows
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue