Revision: 687
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=687&view=rev
Author: and-81
Date: 2007-07-11 20:31:53 -0700 (Wed, 11 Jul 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs 2007-07-12 03:23:10 UTC (rev 686)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs 2007-07-12 03:31:53 UTC (rev 687)
@@ -21,9 +21,6 @@
private static extern int GetWindowText(int hWnd, StringBuilder title, int size);
[DllImport("user32.dll")]
- private static extern int GetWindowModuleFileName(int hWnd, StringBuilder title, int size);
-
- [DllImport("user32.dll")]
private static extern int EnumWindows(EnumWindowsProc ewp, int lParam);
#endregion Interop
@@ -50,24 +47,19 @@
void PopulateList()
{
- EnumWindowsProc ewp = new EnumWindowsProc(EvalWindow);
+ EnumWindowsProc ewp = new EnumWindowsProc(AddWindow);
EnumWindows(ewp, 0);
}
- bool EvalWindow(int hWnd, int lParam)
+ bool AddWindow(int hWnd, int lParam)
{
StringBuilder title = new StringBuilder(256);
GetWindowText(hWnd, title, 256);
- //StringBuilder module = new StringBuilder(256);
- //GetWindowModuleFileName(hWnd, module, 256);
+ if (title.Length != 0)
+ listBoxWindows.Items.Add(title.ToString());
- if (title.Length == 0)
- return true;
-
- listBoxWindows.Items.Add(title.ToString());
-
return true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|