ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/Win32/libWin32/Win32/Window/WindowControl.cs
Revision: 88
Committed: Wed May 9 20:52:20 2012 UTC (11 years ago) by william
File size: 1359 byte(s)
Log Message:

File Contents

# Content
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Runtime.InteropServices;
5 using System.Diagnostics;
6
7 namespace libWin32.Win32.Window
8 {
9 public class WindowControl
10 {
11 [DllImport("user32.dll")]
12 static extern bool SetForegroundWindow(IntPtr hWnd);
13 public static bool FocusWindow(IntPtr hWnd) { return SetForegroundWindow(hWnd); }
14
15 //public static List<ManagedWinapi.Windows.SystemWindow> GetChildWindows(IntPtr parent)
16 //{
17 // return FilterPCXS2GSWindows();
18 //}
19
20 //private static List<ManagedWinapi.Windows.SystemWindow> FilterPCXS2GSWindows()
21 //{
22 // return new List<ManagedWinapi.Windows.SystemWindow>(ManagedWinapi.Windows.SystemWindow.FilterToplevelWindows(new Predicate<ManagedWinapi.Windows.SystemWindow>(PCSX2WindowsLookupFilter)));
23 //}
24 //private static bool PCSX2WindowsLookupFilter(ManagedWinapi.Windows.SystemWindow window)
25 //{
26 // if (window.ClassName.ToLower().Contains("wxwindowclassnr"))
27 // {
28 // // window is correct class
29
30 // if (window.Title.ToLower().StartsWith("gs"))
31 // {
32 // return true;
33 // }
34 // }
35 // return false;
36 //}
37 }
38 }