[Roam-commit] SF.net SVN: roam: [93] Trunk/Source
Status: Alpha
Brought to you by:
jonfroehlich
|
From: <jon...@us...> - 2007-09-13 08:31:38
|
Revision: 93
http://roam.svn.sourceforge.net/roam/?rev=93&view=rev
Author: jonfroehlich
Date: 2007-09-13 01:31:36 -0700 (Thu, 13 Sep 2007)
Log Message:
-----------
1. changed WindowUtils to Roam.UI.Utils
2. Added Hook capabilities and added HookTest capabilities
Modified Paths:
--------------
Trunk/Source/Roam.Common/Roam.Common.csproj
Trunk/Source/Roam.Test/Roam.Test.csproj
Trunk/Source/Roam.Test/Sandbox/EnumWindowsTest.cs
Trunk/Source/Roam.Test/UI/Controls/IImageButtonTest.cs
Trunk/Source/Roam.UI/Roam.UI.csproj
Trunk/Source/Roam.suo
Added Paths:
-----------
Trunk/Source/Roam.Test/Utils/HookTest.Designer.cs
Trunk/Source/Roam.Test/Utils/HookTest.cs
Trunk/Source/Roam.Test/Utils/HookTest.resx
Trunk/Source/Roam.UI/Utils/Hook.cs
Trunk/Source/Roam.UI/Utils/WindowUtils.cs
Removed Paths:
-------------
Trunk/Source/Roam.Common/Utils/WindowUtils.cs
Modified: Trunk/Source/Roam.Common/Roam.Common.csproj
===================================================================
--- Trunk/Source/Roam.Common/Roam.Common.csproj 2007-09-08 11:38:57 UTC (rev 92)
+++ Trunk/Source/Roam.Common/Roam.Common.csproj 2007-09-13 08:31:36 UTC (rev 93)
@@ -100,7 +100,6 @@
<Compile Include="Utils\TimeResolution.cs" />
<Compile Include="Utils\TimeUtils.cs" />
<Compile Include="Utils\TypeUtils.cs" />
- <Compile Include="Utils\WindowUtils.cs" />
<Compile Include="Utils\XmlUtils.cs" />
</ItemGroup>
<Import Condition="'$(TargetFrameworkVersion)' == 'v1.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.v1.targets" />
Deleted: Trunk/Source/Roam.Common/Utils/WindowUtils.cs
===================================================================
--- Trunk/Source/Roam.Common/Utils/WindowUtils.cs 2007-09-08 11:38:57 UTC (rev 92)
+++ Trunk/Source/Roam.Common/Utils/WindowUtils.cs 2007-09-13 08:31:36 UTC (rev 93)
@@ -1,321 +0,0 @@
-#region Copyright & License
-//
-// Copyright (c) 2005 - 2007 The Regents of the University of Washington, Intel
-// Research Seattle, and the Roam project. All rights reserved.
-//
-// This software is open-source under the BSD license. You may obtain a copy
-// of this license at
-//
-// http://roam.sourceforge.net/license.txt
-//
-// Alternatively, please see "license.txt" which should be included in
-// this source code distribution.
-//
-#endregion Copyright & License
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-
-namespace Roam.Common.Utils
-{
- /// <summary>
- ///
- /// </summary>
- /// <remarks>
- ///
- /// </remarks>
- /// <author>Jon Froehlich</author>
- public static class WindowUtils
- {
- public delegate int EnumWindowsProc(IntPtr hwnd, IntPtr lParam);
-
- /// <summary>
- /// The EnumWindows function enumerates all top-level windows on the screen by passing the handle to each window,
- /// in turn, to an application-defined callback function. EnumWindows continues until the last top-level window
- /// is enumerated or the callback function returns FALSE.
- /// </summary>
- /// <param name="enumWindowsProc">[in] Pointer to an application-defined callback function. For more information, see EnumWindowsProc. </param>
- /// <param name="lParam">[in] Specifies an application-defined value to be passed to the callback function. </param>
- /// <returns>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.
- /// To get extended error information, call GetLastError. If EnumWindowsProc returns zero, the return value is also zero.
- /// In this case, the callback function should call SetLastError to obtain a meaningful error code to be returned to the
- /// caller of EnumWindows.
- /// </returns>
- /// <remarks>
- /// The EnumWindows function does not enumerate child windows, with the exception of a few top-level windows owned
- /// by the system that have the WS_CHILD style. This function is more reliable than calling the GetWindow function
- /// in a loop. An application that calls GetWindow to perform this task risks being caught in an infinite loop or
- /// referencing a handle to a window that has been destroyed.
- /// </remarks>
- [DllImport("coredll.dll", SetLastError = true)]
- private static extern int EnumWindows(IntPtr lpEnumFunc, uint lParam);
-
- public static int EnumWindows(EnumWindowsProc enumWindowsProc, uint lParam)
- {
- IntPtr callbackDelegatePointer = Marshal.GetFunctionPointerForDelegate(enumWindowsProc);
- return EnumWindows(callbackDelegatePointer, lParam);
- }
-
- public static int EnumWindows(EnumWindowsProc enumWindowsProc)
- {
- return EnumWindows(enumWindowsProc, 0);
- }
-
- /// <summary>
- /// The SetForegroundWindow function puts the thread that created the specified window into the foreground and activates
- /// the window. Keyboard input is directed to the window, and various visual cues are changed for the user. The system
- /// assigns a slightly higher priority to the thread that created the foreground window than it does to other threads.
- /// </summary>
- /// <param name="hWnd">[in] Handle to the window that should be activated and brought to the foreground. </param>
- /// <returns>If the window was brought to the foreground, the return value is nonzero. If the window was not brought to the foreground,
- /// the return value is zero.
- /// </returns>
- /// <remarks>
- /// The foreground window is the window at the top of the Z-Order. It is the window that the user is working with. In a preemptive
- /// multitasking environment, you should generally let the user control which window is the foreground window.
- /// </remarks>
- [DllImport("coredll.dll", SetLastError = true)]
- public static extern bool SetForegroundWindow(IntPtr hWnd);
-
- /// <summary>
- /// Returns true if the given control contains the handle
- /// </summary>
- /// <param name="handle"></param>
- /// <param name="control"></param>
- /// <returns></returns>
- public static bool ContainsHandle(IntPtr handle, Control control)
- {
- if (control.Handle == handle) { return true; }
- else { return ContainsHandle(handle, control.Controls); }
- }
-
- /// <summary>
- /// Returns true if the control collection contains the given handle
- /// </summary>
- /// <param name="handle"></param>
- /// <param name="controls"></param>
- /// <returns></returns>
- public static bool ContainsHandle(IntPtr handle, Control.ControlCollection controls)
- {
- foreach (Control control in controls)
- {
- if (control.Handle == handle) { return true; }
- if (ContainsHandle(handle, control.Controls)) { return true; }
- }
-
- return false;
- }
-
- /// <summary>
- /// Returns the Control whose hWnd matches the provided handle and is
- /// within the provided container
- /// </summary>
- /// <param name="handle"></param>
- /// <param name="container"></param>
- /// <returns></returns>
- public static Control FindWindow(IntPtr handle, Control container)
- {
- if (handle == container.Handle) { return container; }
- else { return FindWindow(handle, container.Controls); }
- }
-
- /// <summary>
- /// Returns the Control corresponding to the handle in the provided
- /// control collection
- /// </summary>
- /// <param name="handle"></param>
- /// <param name="controls"></param>
- /// <returns></returns>
- public static Control FindWindow(IntPtr handle, Control.ControlCollection controls)
- {
- foreach (Control control in controls)
- {
- if (control.Handle == handle) { return control; }
-
- Control c = FindWindow(handle, control.Controls);
- if (c != null) { return c; }
- }
-
- return null;
- }
-
- /// <summary>
- /// This function retrieves the handle to the top-level window whose class name and window name match the specified strings.
- /// This function does not search child windows.
- /// </summary>
- /// <param name="lpClassName">Long pointer to a null-terminated string that specifies the class name or is an atom that
- /// identifies the class-name string. If this parameter is an atom, it must be a global atom
- /// created by a previous call to the GlobalAddAtom function. The atom, a 16-bit value, must be
- /// placed in the low-order word of lpClassName; the high-order word must be zero. </param>
- /// <param name="lpWindowName">Long pointer to a null-terminated string that specifies the window name (the window's title).
- /// If this parameter is NULL, all window names match. </param>
- /// <returns>A handle to the window that has the specified class name and window name indicates success. NULL indicates failure.
- /// To get extended error information, call GetLastError. </returns>
- /// <remarks>
- /// If lpClassName is an atom, it must be an atom returned from RegisterClass.
- /// </remarks>
- [DllImport("coredll.dll", SetLastError = true)]
- public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
-
- /// <summary>
- /// This function retrieves the handle to the top-level window whose window name match the specified strings.
- /// This function does not search child windows.
- /// </summary>
- /// <param name="windowTitle"></param>
- /// <returns></returns>
- public static IntPtr FindWindow(string windowTitle)
- {
- return FindWindow(null, windowTitle);
- }
-
- /// <summary>
- /// This function destroys the specified window. The function sends a WM_DESTROY message to the window to
- /// deactivate it and removes the keyboard focus from it. The function also destroys the window's menu,
- /// destroys timers, removes clipboard ownership, and breaks the clipboard viewer chain (if the window
- /// is at the top of the viewer chain).
- ///
- /// If the specified window is a parent or owner window, DestroyWindow automatically destroys the associated
- /// child or owned windows when it destroys the parent or owner window. The function first destroys child or
- /// owned windows, and then it destroys the parent or owner window.
- ///
- /// DestroyWindow also destroys modeless dialog boxes created by the CreateDialog function.
- /// </summary>
- /// <param name="hWnd">[in] Handle to the window to be destroyed. </param>
- /// <returns>true if the window is destroyed, false otherwise</returns>
- public static extern bool DestroyWindow(IntPtr hWnd);
-
- /// <summary>
- /// This function returns a handle to the desktop window. The desktop window covers the entire screen. The desktop window is
- /// the area on top of which all icons and other windows are painted.
- /// </summary>
- /// <returns>The return value is a handle to the desktop window.</returns>
- [DllImport("coredll.dll", SetLastError = true)]
- public static extern IntPtr GetDesktopWindow();
-
- public static void PrintWindowHandles(Control control)
- {
- Debug.WriteLine(String.Format("Name: {0} Type: {1} Handle: {2}", control.Name, control.GetType().FullName, control.Handle));
- PrintWindowHandles(control.Controls);
- }
-
- public static void PrintWindowHandles(Control.ControlCollection controls)
- {
- foreach (Control control in controls)
- {
- Debug.WriteLine(String.Format("Name: {0} Type: {1} Handle: {2}", control.Name, control.GetType().FullName, control.Handle));
- PrintWindowHandles(control.Controls);
- }
- }
-
- public static void FindAndPrintFocusedControl(Control control)
- {
- Control controlFocused = FindFocusedControl(control);
- if (controlFocused == null)
- {
- Debug.WriteLine(
- String.Format("Could not find any focused controls in Name: {0} Type: {1} Handle: {2} or any of its children",
- control.Name, control.GetType().FullName, control.Handle));
- }
- else
- {
- Debug.WriteLine(
- String.Format("Focused control: Name: {0} Type: {1} Handle: {2}",
- controlFocused.Name, controlFocused.GetType().FullName, controlFocused.Handle));
- }
- }
-
- public static Control FindFocusedControl(Control control)
- {
- if (control.Focused) { return control; }
- else { return FindFocusedControl(control.Controls); }
- }
-
- public static Control FindFocusedControl(Control.ControlCollection controls)
- {
- foreach (Control control in controls)
- {
- if (control.Focused) { return control; }
-
- Control c = FindFocusedControl(control.Controls);
- if (c != null) { return c; }
- }
- return null;
- }
-
- /// <summary>
- /// The GetForegroundWindow function returns a handle to the foreground window (the window with which the user is currently working).
- /// The system assigns a slightly higher priority to the thread that creates the foreground window than it does to other threads.
- /// </summary>
- /// <returns>The return value is a handle to the foreground window. The foreground window can be NULL in certain circumstances,
- /// such as when a window is losing activation. </returns>
- [DllImport("coredll.dll", SetLastError = true)]
- public static extern IntPtr GetForegroundWindow();
-
- /// <summary>
- /// The GetWindowText function copies the text of the specified window's title bar (if it has one) into a buffer.
- /// If the specified window is a control, the text of the control is copied. However, GetWindowText cannot retrieve
- /// the text of a control in another application.
- /// </summary>
- /// <param name="hWnd">[in] Handle to the window or control containing the text.</param>
- /// <param name="lpString">[out] Pointer to the buffer that will receive the text. If the string is as long or longer than the buffer,
- /// the string is truncated and terminated with a NULL character. </param>
- /// <param name="nMaxCount">[in] Specifies the maximum number of characters to copy to the buffer, including the NULL character.
- /// If the text exceeds this limit, it is truncated. </param>
- /// <returns>If the function succeeds, the return value is the length, in characters, of the copied string, not including
- /// the terminating NULL character. If the window has no title bar or text, if the title bar is empty, or if the window
- /// or control handle is invalid, the return value is zero. To get extended error information, call GetLastError.
- /// This function cannot retrieve the text of an edit control in another application.
- /// </returns>
- [DllImport("coredll.dll", SetLastError = true)]
- private static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
-
- public static string GetWindowText(IntPtr hWnd)
- {
- return GetWindowText(hWnd, 1000);
- }
-
- public static string GetWindowText(IntPtr hWnd, int nMaxCount)
- {
- StringBuilder sb = new StringBuilder(nMaxCount);
- GetWindowText(hWnd, sb, sb.Capacity);
- return sb.ToString();
- }
-
- /// <summary>
- /// The GetWindow function retrieves a handle to a window that has the specified relationship (Z-Order or owner) to the specified window.
- /// </summary>
- /// <param name="hWnd">[in] Handle to a window. The window handle retrieved is relative to this window, based on the value of the uCmd parameter. </param>
- /// <param name="uCmd"></param>
- /// <returns></returns>
- [DllImport("coredll.dll")]
- public static extern IntPtr GetWindow(IntPtr hWnd, uint uCmd);
-
- public static IntPtr GetChildWindow(IntPtr hWnd)
- {
- return GetWindow(hWnd, GetWindowConstants.GW_CHILD);
- }
- }
-
- /// <summary>
- ///
- /// </summary>
- /// <remarks>
- ///
- /// </remarks>
- /// <author>Jon Froehlich</author>
- public static class GetWindowConstants
- {
- // Flags for GetWindow() api
- // found in winuser.h
- public static uint GW_HWNDFIRST = 0;
- public static uint GW_HWNDLAST = 1;
- public static uint GW_HWNDNEXT = 2;
- public static uint GW_HWNDPREV = 3;
- public static uint GW_OWNER = 4;
- public static uint GW_CHILD = 5;
- public static uint GW_MAX = 5;
- }
-}
Modified: Trunk/Source/Roam.Test/Roam.Test.csproj
===================================================================
--- Trunk/Source/Roam.Test/Roam.Test.csproj 2007-09-08 11:38:57 UTC (rev 92)
+++ Trunk/Source/Roam.Test/Roam.Test.csproj 2007-09-13 08:31:36 UTC (rev 93)
@@ -338,6 +338,10 @@
<SubType>Designer</SubType>
<DependentUpon>WallpaperTest.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="Utils\HookTest.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>HookTest.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="Utils\IdleTimeForm.resx">
<SubType>Designer</SubType>
<DependentUpon>IdleTimeForm.cs</DependentUpon>
@@ -537,7 +541,7 @@
<DependentUpon>TextBoxFilteredListTest.cs</DependentUpon>
</Compile>
<Compile Include="UI\Controls\FontTest.cs">
- <SubType>Form</SubType>
+ <SubType>Component</SubType>
</Compile>
<Compile Include="UI\Controls\FontTest.Designer.cs">
<DependentUpon>FontTest.cs</DependentUpon>
@@ -675,7 +679,7 @@
<DependentUpon>SystemColorTest.cs</DependentUpon>
</Compile>
<Compile Include="UI\Controls\TabControlTest.cs">
- <SubType>Form</SubType>
+ <SubType>Component</SubType>
</Compile>
<Compile Include="UI\Controls\TabControlTest.Designer.cs">
<DependentUpon>TabControlTest.cs</DependentUpon>
@@ -716,6 +720,12 @@
<Compile Include="UI\Controls\WallpaperTest.Designer.cs">
<DependentUpon>WallpaperTest.cs</DependentUpon>
</Compile>
+ <Compile Include="Utils\HookTest.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Utils\HookTest.Designer.cs">
+ <DependentUpon>HookTest.cs</DependentUpon>
+ </Compile>
<Compile Include="Utils\IdleTimeForm.cs">
<SubType>Form</SubType>
</Compile>
Modified: Trunk/Source/Roam.Test/Sandbox/EnumWindowsTest.cs
===================================================================
--- Trunk/Source/Roam.Test/Sandbox/EnumWindowsTest.cs 2007-09-08 11:38:57 UTC (rev 92)
+++ Trunk/Source/Roam.Test/Sandbox/EnumWindowsTest.cs 2007-09-13 08:31:36 UTC (rev 93)
@@ -7,6 +7,7 @@
using System.Windows.Forms;
using System.Runtime.InteropServices;
using Roam.Common.Utils;
+using Roam.UI.Utils;
namespace Roam.Test.Sandbox
{
Modified: Trunk/Source/Roam.Test/UI/Controls/IImageButtonTest.cs
===================================================================
--- Trunk/Source/Roam.Test/UI/Controls/IImageButtonTest.cs 2007-09-08 11:38:57 UTC (rev 92)
+++ Trunk/Source/Roam.Test/UI/Controls/IImageButtonTest.cs 2007-09-13 08:31:36 UTC (rev 93)
@@ -26,6 +26,7 @@
using OpenNETCF.Drawing.Imaging;
using Roam.UI.Drawing;
using Roam.Common.Utils;
+using Roam.UI.Utils;
namespace MyExperience.Test
{
Added: Trunk/Source/Roam.Test/Utils/HookTest.Designer.cs
===================================================================
--- Trunk/Source/Roam.Test/Utils/HookTest.Designer.cs (rev 0)
+++ Trunk/Source/Roam.Test/Utils/HookTest.Designer.cs 2007-09-13 08:31:36 UTC (rev 93)
@@ -0,0 +1,90 @@
+namespace Roam.Test.Utils
+{
+ partial class HookTest
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+ private System.Windows.Forms.MainMenu mainMenu1;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.mainMenu1 = new System.Windows.Forms.MainMenu();
+ this.scrollableLabel1 = new Roam.UI.Controls.ScrollableLabel();
+ this.menuItem1 = new System.Windows.Forms.MenuItem();
+ this.menuItem2 = new System.Windows.Forms.MenuItem();
+ this.menuItem3 = new System.Windows.Forms.MenuItem();
+ this.SuspendLayout();
+ //
+ // mainMenu1
+ //
+ this.mainMenu1.MenuItems.Add(this.menuItem1);
+ this.mainMenu1.MenuItems.Add(this.menuItem2);
+ //
+ // scrollableLabel1
+ //
+ this.scrollableLabel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.scrollableLabel1.Font = new System.Drawing.Font("Segoe Condensed", 7F, System.Drawing.FontStyle.Regular);
+ this.scrollableLabel1.Location = new System.Drawing.Point(0, 0);
+ this.scrollableLabel1.Name = "scrollableLabel1";
+ this.scrollableLabel1.Size = new System.Drawing.Size(240, 266);
+ this.scrollableLabel1.TabIndex = 1;
+ this.scrollableLabel1.Text = "scrollableLabel1";
+ //
+ // menuItem1
+ //
+ this.menuItem1.Text = "Exit";
+ this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
+ //
+ // menuItem2
+ //
+ this.menuItem2.MenuItems.Add(this.menuItem3);
+ this.menuItem2.Text = "Menu";
+ //
+ // menuItem3
+ //
+ this.menuItem3.Text = "Clear";
+ this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
+ //
+ // HookTest
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(131F, 131F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ this.AutoScroll = true;
+ this.ClientSize = new System.Drawing.Size(240, 266);
+ this.Controls.Add(this.scrollableLabel1);
+ this.Menu = this.mainMenu1;
+ this.Name = "HookTest";
+ this.Text = "HookTest";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private Roam.UI.Controls.ScrollableLabel scrollableLabel1;
+ private System.Windows.Forms.MenuItem menuItem1;
+ private System.Windows.Forms.MenuItem menuItem2;
+ private System.Windows.Forms.MenuItem menuItem3;
+ }
+}
\ No newline at end of file
Added: Trunk/Source/Roam.Test/Utils/HookTest.cs
===================================================================
--- Trunk/Source/Roam.Test/Utils/HookTest.cs (rev 0)
+++ Trunk/Source/Roam.Test/Utils/HookTest.cs 2007-09-13 08:31:36 UTC (rev 93)
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using Roam.UI.Utils;
+
+namespace Roam.Test.Utils
+{
+ public partial class HookTest : Form
+ {
+ private Hook _hook = new Hook();
+ public HookTest()
+ {
+ InitializeComponent();
+ _hook.WndProcEvent += new EventHandler<WndProcEventArgs>(_hook_WndProcEvent);
+ }
+
+ private void _hook_WndProcEvent(object sender, WndProcEventArgs e)
+ {
+ e.Handled = true;
+ scrollableLabel1.AddLine(
+ string.Format("AttachedHwnd={0} OldWndProc={1} HWnd={2} Msg={3} WParam={4} LParam={5}",
+ e.AttachedHwnd, e.OldWndProc, e.HWnd, e.Msg, e.WParam, e.LParam));
+ }
+
+ protected override void OnHandleCreated(EventArgs e)
+ {
+ _hook.Attach(this);
+ base.OnHandleCreated(e);
+ }
+
+ private void menuItem1_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ private void menuItem3_Click(object sender, EventArgs e)
+ {
+ scrollableLabel1.Clear();
+ }
+ }
+}
\ No newline at end of file
Added: Trunk/Source/Roam.Test/Utils/HookTest.resx
===================================================================
--- Trunk/Source/Roam.Test/Utils/HookTest.resx (rev 0)
+++ Trunk/Source/Roam.Test/Utils/HookTest.resx 2007-09-13 08:31:36 UTC (rev 93)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="mainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="$this.FormFactorShadowProperty" xml:space="preserve">
+ <value>Smartphone QVGA</value>
+ </metadata>
+ <metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+</root>
\ No newline at end of file
Modified: Trunk/Source/Roam.UI/Roam.UI.csproj
===================================================================
--- Trunk/Source/Roam.UI/Roam.UI.csproj 2007-09-08 11:38:57 UTC (rev 92)
+++ Trunk/Source/Roam.UI/Roam.UI.csproj 2007-09-13 08:31:36 UTC (rev 93)
@@ -234,11 +234,13 @@
<Compile Include="Forms\FormFactory.cs">
<SubType>Form</SubType>
</Compile>
+ <Compile Include="Utils\Hook.cs" />
<Compile Include="Utils\HotKeyManager.cs" />
<Compile Include="Utils\KeySniffer.cs" />
<Compile Include="Utils\PowerNotificationUIThread.cs" />
<Compile Include="Utils\ScreenUtils.cs" />
<Compile Include="Utils\WindowsMessagingUtils.cs" />
+ <Compile Include="Utils\WindowUtils.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Controls\AudioRecorder.resx">
Added: Trunk/Source/Roam.UI/Utils/Hook.cs
===================================================================
--- Trunk/Source/Roam.UI/Utils/Hook.cs (rev 0)
+++ Trunk/Source/Roam.UI/Utils/Hook.cs 2007-09-13 08:31:36 UTC (rev 93)
@@ -0,0 +1,111 @@
+//
+// Author: Sergey Bogdanov <ser...@gm...>
+// Url: http://www.sergeybogdanov.com
+//
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+
+namespace Roam.UI.Utils
+{
+ public delegate int WndProcDelegate(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
+
+ /// <summary>
+ /// This class is based on the WindowHook from Sergey Bogdanov found at:
+ /// http://www.sergeybogdanov.com/Samples/
+ /// Direct Link: http://www.sergeybogdanov.com/Samples/WindowHook.zip
+ /// </summary>
+ public class Hook
+ {
+ #region Fields
+ private IntPtr _oldWndProc;
+ private IntPtr _hwnd;
+ private WndProcDelegate _newWndProc;
+ public event EventHandler<WndProcEventArgs> WndProcEvent;
+ #endregion Fields
+
+ #region Constructors
+ public Hook()
+ {
+ _newWndProc = new WndProcDelegate(WndProc);
+ }
+ #endregion Constructors
+
+ #region Methods
+ public void Attach(Control c)
+ {
+ Attach(c.Handle);
+ }
+
+ public void Attach(IntPtr hwnd)
+ {
+ _hwnd = hwnd;
+ _oldWndProc = WindowUtils.GetWindowLong(hwnd, GWL_WNDPROC);
+ if (_oldWndProc == IntPtr.Zero) throw new Win32Exception();
+ int r = WindowUtils.SetWindowLong(hwnd, GWL_WNDPROC, _newWndProc);
+ if (r == 0) throw new Win32Exception();
+ }
+
+ public void Detach()
+ {
+ int r = WindowUtils.SetWindowLong(_hwnd, GWL_WNDPROC, _oldWndProc);
+ if (r == 0) throw new Win32Exception();
+ }
+
+ protected virtual int WndProc(IntPtr hWnd, uint msg, IntPtr wparam, IntPtr lparam)
+ {
+ WndProcEventArgs wndProcEventArgs = new WndProcEventArgs(_hwnd, _oldWndProc, hWnd, msg, wparam, lparam);
+ if (WndProcEvent != null)
+ {
+ WndProcEvent(this, wndProcEventArgs);
+ }
+
+ if (wndProcEventArgs.Handled == false)
+ {
+ return WindowUtils.CallWindowProc(_oldWndProc, hWnd, msg, wparam, lparam);
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ #endregion Methods
+
+ const int GWL_WNDPROC = -4;
+ }
+
+ public class WndProcEventArgs : EventArgs
+ {
+ #region Fields
+ private IntPtr _attachedHWnd;
+ private IntPtr _oldWndProc;
+ private IntPtr _hWnd;
+ private uint _msg;
+ private IntPtr _wparam;
+ private IntPtr _lparam;
+ private bool _handled = false;
+ #endregion Fields
+
+ public WndProcEventArgs(IntPtr attachedHwnd, IntPtr oldWndProc, IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam)
+ {
+ _attachedHWnd = attachedHwnd;
+ _oldWndProc = oldWndProc;
+ _hWnd = hWnd;
+ _msg = msg;
+ _wparam = wParam;
+ _lparam = lParam;
+ }
+
+ public IntPtr AttachedHwnd { get { return _attachedHWnd; } }
+ public IntPtr OldWndProc { get { return _oldWndProc; } }
+ public IntPtr HWnd { get { return _hWnd; } }
+ public uint Msg { get { return _msg; } }
+ public IntPtr WParam { get { return _wparam; } }
+ public IntPtr LParam { get { return _lparam; } }
+
+ public bool Handled { get { return _handled; } set { _handled = value; } }
+ }
+}
Added: Trunk/Source/Roam.UI/Utils/WindowUtils.cs
===================================================================
--- Trunk/Source/Roam.UI/Utils/WindowUtils.cs (rev 0)
+++ Trunk/Source/Roam.UI/Utils/WindowUtils.cs 2007-09-13 08:31:36 UTC (rev 93)
@@ -0,0 +1,335 @@
+#region Copyright & License
+//
+// Copyright (c) 2005 - 2007 The Regents of the University of Washington, Intel
+// Research Seattle, and the Roam project. All rights reserved.
+//
+// This software is open-source under the BSD license. You may obtain a copy
+// of this license at
+//
+// http://roam.sourceforge.net/license.txt
+//
+// Alternatively, please see "license.txt" which should be included in
+// this source code distribution.
+//
+#endregion Copyright & License
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+namespace Roam.UI.Utils
+{
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>
+ ///
+ /// </remarks>
+ /// <author>Jon Froehlich</author>
+ public static class WindowUtils
+ {
+ public delegate int EnumWindowsProc(IntPtr hwnd, IntPtr lParam);
+
+ /// <summary>
+ /// The EnumWindows function enumerates all top-level windows on the screen by passing the handle to each window,
+ /// in turn, to an application-defined callback function. EnumWindows continues until the last top-level window
+ /// is enumerated or the callback function returns FALSE.
+ /// </summary>
+ /// <param name="enumWindowsProc">[in] Pointer to an application-defined callback function. For more information, see EnumWindowsProc. </param>
+ /// <param name="lParam">[in] Specifies an application-defined value to be passed to the callback function. </param>
+ /// <returns>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.
+ /// To get extended error information, call GetLastError. If EnumWindowsProc returns zero, the return value is also zero.
+ /// In this case, the callback function should call SetLastError to obtain a meaningful error code to be returned to the
+ /// caller of EnumWindows.
+ /// </returns>
+ /// <remarks>
+ /// The EnumWindows function does not enumerate child windows, with the exception of a few top-level windows owned
+ /// by the system that have the WS_CHILD style. This function is more reliable than calling the GetWindow function
+ /// in a loop. An application that calls GetWindow to perform this task risks being caught in an infinite loop or
+ /// referencing a handle to a window that has been destroyed.
+ /// </remarks>
+ [DllImport("coredll.dll", SetLastError = true)]
+ private static extern int EnumWindows(IntPtr lpEnumFunc, uint lParam);
+
+ public static int EnumWindows(EnumWindowsProc enumWindowsProc, uint lParam)
+ {
+ IntPtr callbackDelegatePointer = Marshal.GetFunctionPointerForDelegate(enumWindowsProc);
+ return EnumWindows(callbackDelegatePointer, lParam);
+ }
+
+ public static int EnumWindows(EnumWindowsProc enumWindowsProc)
+ {
+ return EnumWindows(enumWindowsProc, 0);
+ }
+
+ /// <summary>
+ /// The SetForegroundWindow function puts the thread that created the specified window into the foreground and activates
+ /// the window. Keyboard input is directed to the window, and various visual cues are changed for the user. The system
+ /// assigns a slightly higher priority to the thread that created the foreground window than it does to other threads.
+ /// </summary>
+ /// <param name="hWnd">[in] Handle to the window that should be activated and brought to the foreground. </param>
+ /// <returns>If the window was brought to the foreground, the return value is nonzero. If the window was not brought to the foreground,
+ /// the return value is zero.
+ /// </returns>
+ /// <remarks>
+ /// The foreground window is the window at the top of the Z-Order. It is the window that the user is working with. In a preemptive
+ /// multitasking environment, you should generally let the user control which window is the foreground window.
+ /// </remarks>
+ [DllImport("coredll.dll", SetLastError = true)]
+ public static extern bool SetForegroundWindow(IntPtr hWnd);
+
+ /// <summary>
+ /// Returns true if the given control contains the handle
+ /// </summary>
+ /// <param name="handle"></param>
+ /// <param name="control"></param>
+ /// <returns></returns>
+ public static bool ContainsHandle(IntPtr handle, Control control)
+ {
+ if (control.Handle == handle) { return true; }
+ else { return ContainsHandle(handle, control.Controls); }
+ }
+
+ /// <summary>
+ /// Returns true if the control collection contains the given handle
+ /// </summary>
+ /// <param name="handle"></param>
+ /// <param name="controls"></param>
+ /// <returns></returns>
+ public static bool ContainsHandle(IntPtr handle, Control.ControlCollection controls)
+ {
+ foreach (Control control in controls)
+ {
+ if (control.Handle == handle) { return true; }
+ if (ContainsHandle(handle, control.Controls)) { return true; }
+ }
+
+ return false;
+ }
+
+ /// <summary>
+ /// Returns the Control whose hWnd matches the provided handle and is
+ /// within the provided container
+ /// </summary>
+ /// <param name="handle"></param>
+ /// <param name="container"></param>
+ /// <returns></returns>
+ public static Control FindWindow(IntPtr handle, Control container)
+ {
+ if (handle == container.Handle) { return container; }
+ else { return FindWindow(handle, container.Controls); }
+ }
+
+ /// <summary>
+ /// Returns the Control corresponding to the handle in the provided
+ /// control collection
+ /// </summary>
+ /// <param name="handle"></param>
+ /// <param name="controls"></param>
+ /// <returns></returns>
+ public static Control FindWindow(IntPtr handle, Control.ControlCollection controls)
+ {
+ foreach (Control control in controls)
+ {
+ if (control.Handle == handle) { return control; }
+
+ Control c = FindWindow(handle, control.Controls);
+ if (c != null) { return c; }
+ }
+
+ return null;
+ }
+
+ /// <summary>
+ /// This function retrieves the handle to the top-level window whose class name and window name match the specified strings.
+ /// This function does not search child windows.
+ /// </summary>
+ /// <param name="lpClassName">Long pointer to a null-terminated string that specifies the class name or is an atom that
+ /// identifies the class-name string. If this parameter is an atom, it must be a global atom
+ /// created by a previous call to the GlobalAddAtom function. The atom, a 16-bit value, must be
+ /// placed in the low-order word of lpClassName; the high-order word must be zero. </param>
+ /// <param name="lpWindowName">Long pointer to a null-terminated string that specifies the window name (the window's title).
+ /// If this parameter is NULL, all window names match. </param>
+ /// <returns>A handle to the window that has the specified class name and window name indicates success. NULL indicates failure.
+ /// To get extended error information, call GetLastError. </returns>
+ /// <remarks>
+ /// If lpClassName is an atom, it must be an atom returned from RegisterClass.
+ /// </remarks>
+ [DllImport("coredll.dll", SetLastError = true)]
+ public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
+
+ /// <summary>
+ /// This function retrieves the handle to the top-level window whose window name match the specified strings.
+ /// This function does not search child windows.
+ /// </summary>
+ /// <param name="windowTitle"></param>
+ /// <returns></returns>
+ public static IntPtr FindWindow(string windowTitle)
+ {
+ return FindWindow(null, windowTitle);
+ }
+
+ /// <summary>
+ /// This function destroys the specified window. The function sends a WM_DESTROY message to the window to
+ /// deactivate it and removes the keyboard focus from it. The function also destroys the window's menu,
+ /// destroys timers, removes clipboard ownership, and breaks the clipboard viewer chain (if the window
+ /// is at the top of the viewer chain).
+ ///
+ /// If the specified window is a parent or owner window, DestroyWindow automatically destroys the associated
+ /// child or owned windows when it destroys the parent or owner window. The function first destroys child or
+ /// owned windows, and then it destroys the parent or owner window.
+ ///
+ /// DestroyWindow also destroys modeless dialog boxes created by the CreateDialog function.
+ /// </summary>
+ /// <param name="hWnd">[in] Handle to the window to be destroyed.</param>
+ /// <returns>0 if the window is destroyed, otherwise non-zero</returns>
+ [DllImport("coredll.dll", SetLastError = true)]
+ public static extern IntPtr DestroyWindow(IntPtr hWnd);
+
+ /// <summary>
+ /// This function returns a handle to the desktop window. The desktop window covers the entire screen. The desktop window is
+ /// the area on top of which all icons and other windows are painted.
+ /// </summary>
+ /// <returns>The return value is a handle to the desktop window.</returns>
+ [DllImport("coredll.dll", SetLastError = true)]
+ public static extern IntPtr GetDesktopWindow();
+
+ public static void PrintWindowHandles(Control control)
+ {
+ Debug.WriteLine(String.Format("Name: {0} Type: {1} Handle: {2}", control.Name, control.GetType().FullName, control.Handle));
+ PrintWindowHandles(control.Controls);
+ }
+
+ public static void PrintWindowHandles(Control.ControlCollection controls)
+ {
+ foreach (Control control in controls)
+ {
+ Debug.WriteLine(String.Format("Name: {0} Type: {1} Handle: {2}", control.Name, control.GetType().FullName, control.Handle));
+ PrintWindowHandles(control.Controls);
+ }
+ }
+
+ public static void FindAndPrintFocusedControl(Control control)
+ {
+ Control controlFocused = FindFocusedControl(control);
+ if (controlFocused == null)
+ {
+ Debug.WriteLine(
+ String.Format("Could not find any focused controls in Name: {0} Type: {1} Handle: {2} or any of its children",
+ control.Name, control.GetType().FullName, control.Handle));
+ }
+ else
+ {
+ Debug.WriteLine(
+ String.Format("Focused control: Name: {0} Type: {1} Handle: {2}",
+ controlFocused.Name, controlFocused.GetType().FullName, controlFocused.Handle));
+ }
+ }
+
+ public static Control FindFocusedControl(Control control)
+ {
+ if (control.Focused) { return control; }
+ else { return FindFocusedControl(control.Controls); }
+ }
+
+ public static Control FindFocusedControl(Control.ControlCollection controls)
+ {
+ foreach (Control control in controls)
+ {
+ if (control.Focused) { return control; }
+
+ Control c = FindFocusedControl(control.Controls);
+ if (c != null) { return c; }
+ }
+ return null;
+ }
+
+ /// <summary>
+ /// The GetForegroundWindow function returns a handle to the foreground window (the window with which the user is currently working).
+ /// The system assigns a slightly higher priority to the thread that creates the foreground window than it does to other threads.
+ /// </summary>
+ /// <returns>The return value is a handle to the foreground window. The foreground window can be NULL in certain circumstances,
+ /// such as when a window is losing activation. </returns>
+ [DllImport("coredll.dll", SetLastError = true)]
+ public static extern IntPtr GetForegroundWindow();
+
+ /// <summary>
+ /// The GetWindowText function copies the text of the specified window's title bar (if it has one) into a buffer.
+ /// If the specified window is a control, the text of the control is copied. However, GetWindowText cannot retrieve
+ /// the text of a control in another application.
+ /// </summary>
+ /// <param name="hWnd">[in] Handle to the window or control containing the text.</param>
+ /// <param name="lpString">[out] Pointer to the buffer that will receive the text. If the string is as long or longer than the buffer,
+ /// the string is truncated and terminated with a NULL character. </param>
+ /// <param name="nMaxCount">[in] Specifies the maximum number of characters to copy to the buffer, including the NULL character.
+ /// If the text exceeds this limit, it is truncated. </param>
+ /// <returns>If the function succeeds, the return value is the length, in characters, of the copied string, not including
+ /// the terminating NULL character. If the window has no title bar or text, if the title bar is empty, or if the window
+ /// or control handle is invalid, the return value is zero. To get extended error information, call GetLastError.
+ /// This function cannot retrieve the text of an edit control in another application.
+ /// </returns>
+ [DllImport("coredll.dll", SetLastError = true)]
+ private static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
+
+ public static string GetWindowText(IntPtr hWnd)
+ {
+ return GetWindowText(hWnd, 1000);
+ }
+
+ public static string GetWindowText(IntPtr hWnd, int nMaxCount)
+ {
+ StringBuilder sb = new StringBuilder(nMaxCount);
+ GetWindowText(hWnd, sb, sb.Capacity);
+ return sb.ToString();
+ }
+
+ /// <summary>
+ /// The GetWindow function retrieves a handle to a window that has the specified relationship (Z-Order or owner) to the specified window.
+ /// </summary>
+ /// <param name="hWnd">[in] Handle to a window. The window handle retrieved is relative to this window, based on the value of the uCmd parameter. </param>
+ /// <param name="uCmd"></param>
+ /// <returns></returns>
+ [DllImport("coredll.dll")]
+ public static extern IntPtr GetWindow(IntPtr hWnd, uint uCmd);
+
+ public static IntPtr GetChildWindow(IntPtr hWnd)
+ {
+ return GetWindow(hWnd, GetWindowConstants.GW_CHILD);
+ }
+
+
+ [DllImport("coredll.dll", SetLastError = true)]
+ public static extern IntPtr GetWindowLong(IntPtr hWnd, int nIndex);
+
+ [DllImport("coredll.dll", SetLastError = true)]
+ public static extern int SetWindowLong(IntPtr hWnd, int nIndex, WndProcDelegate newProc);
+
+ [DllImport("coredll.dll", SetLastError = true)]
+ public static extern int SetWindowLong(IntPtr hWnd, int nIndex, IntPtr newProc);
+
+ [DllImport("coredll.dll", SetLastError = true)]
+ public static extern int CallWindowProc(IntPtr lpPrevWndFunc, IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>
+ ///
+ /// </remarks>
+ /// <author>Jon Froehlich</author>
+ public static class GetWindowConstants
+ {
+ // Flags for GetWindow() api
+ // found in winuser.h
+ public static uint GW_HWNDFIRST = 0;
+ public static uint GW_HWNDLAST = 1;
+ public static uint GW_HWNDNEXT = 2;
+ public static uint GW_HWNDPREV = 3;
+ public static uint GW_OWNER = 4;
+ public static uint GW_CHILD = 5;
+ public static uint GW_MAX = 5;
+ }
+}
Modified: Trunk/Source/Roam.suo
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|