initial oogynize check in _ this actually used to work!

This commit is contained in:
2016-02-14 21:16:31 -08:00
parent b183af5d55
commit 532ea133bc
337 changed files with 30692 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
using System;
using System.Runtime.InteropServices;
using System.Reflection;
namespace Foo.Deskband.BandObject
{
/// <summary>
/// Represents different styles of a band object.
/// </summary>
[Flags]
[Serializable]
public enum BandObjectStyle : uint
{
Vertical = 1,
Horizontal = 2,
ExplorerToolbar = 4,
TaskbarToolBar = 8
}
/// <summary>
/// Specifies Style of the band object, its Name(displayed in explorer menu) and HelpText(displayed in status bar when menu command selected).
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class BandObjectAttribute : System.Attribute
{
public BandObjectAttribute(){}
public BandObjectAttribute(string name, BandObjectStyle style)
{
Name = name;
Style = style;
}
public BandObjectStyle Style;
public string Name;
public string HelpText;
}
}

View File

@@ -0,0 +1,476 @@
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using SHDocVw;
using System.Reflection;
using System.Diagnostics;
using System.Drawing;
using System.ComponentModel;
using Microsoft.Win32;
using System.Runtime.InteropServices;
[assembly: AssemblyVersion("1.0.0.0")]
namespace Foo.Deskband.BandObject
{
/// <summary>
/// Contains main desk band functionality
/// </summary>
/// <example>
/// </example>
public class BandObjectBase : UserControl, IObjectWithSite, IDeskBand, IDeskBand2, IDockingWindow, IOleWindow, IInputObject
{
[DllImport("user32.dll")]
public static extern Int32 GetWindowLong(IntPtr hwnd, int nIndex);
[DllImport("user32.dll")]
public static extern Int32 SetWindowLong(IntPtr hwnd, int nIndex, Int32 dwNewLong);
[DllImport("user32.dll")]
public static extern bool SetLayeredWindowAttributes(IntPtr hwnd, Int32 crKey, int bAlpha, uint dwFlags);
public const int GWL_EXSTYLE = -20;
public const int LWA_COLORKEY = 0x00000001;
public const int WS_EX_LAYERED = 0x00080000;
[StructLayout(LayoutKind.Sequential)]
struct COLORREF
{
public byte R;
public byte G;
public byte B;
}
public BandObjectBase()
{
InitializeComponent();
}
private void InitializeComponent()
{
this.SuspendLayout();
//
// BandObjectBase
//
this.BackColor = System.Drawing.Color.Black;
this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "BandObjectBase";
this.Size = new System.Drawing.Size(24, 24);
this.MinimumSize = new System.Drawing.Size(24, 24);
this.MaximumSize = new System.Drawing.Size(24, 24);
this.ResumeLayout(false);
this.HandleCreated += new System.EventHandler(Band_HandleCreated);
this.HandleDestroyed += new System.EventHandler(Band_HandleDestroyed);
}
private void Band_HandleCreated(object sender, EventArgs e)
{
IntPtr hWnd = this.Handle;
SetWindowLong(hWnd, GWL_EXSTYLE, GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
SetLayeredWindowAttributes(hWnd, 0x00000000, 0, LWA_COLORKEY);
}
private void Band_HandleDestroyed(object sender, EventArgs e)
{
}
#region IObjectWithSite
public virtual void GetSite(ref Guid riid, out Object ppvSite)
{
ppvSite = BandObjectSite;
}
public virtual void SetSite(Object pUnkSite)
{
if (BandObjectSite != null)
Marshal.ReleaseComObject(BandObjectSite);
if (Explorer != null)
{
Marshal.ReleaseComObject(Explorer);
Explorer = null;
}
BandObjectSite = (IInputObjectSite)pUnkSite;
if (BandObjectSite != null)
{
//pUnkSite is a pointer to object that implements IOleWindowSite or something similar
//we need to get access to the top level object - explorer itself
//to allows this explorer objects also implement IServiceProvider interface
//(don't mix it with System.IServiceProvider!)
//we get this interface and ask it to find WebBrowserApp
_IServiceProvider sp = BandObjectSite as _IServiceProvider;
Guid guid = ExplorerGUIDs.IID_IWebBrowserApp;
Guid riid = ExplorerGUIDs.IID_IUnknown;
try
{
object w;
sp.QueryService(
ref guid,
ref riid,
out w);
//once we have interface to the COM object we can create RCW from it
Explorer = (WebBrowserClass)Marshal.CreateWrapperOfType(
w as IWebBrowser,
typeof(WebBrowserClass)
);
OnExplorerAttached(EventArgs.Empty);
}
catch (COMException)
{
//we anticipate this exception in case our object instantiated
//as a Desk Band. There is no web browser service available.
}
}
}
#endregion
#region IDeskband
public virtual void GetWindow(out System.IntPtr phwnd)
{
phwnd = Handle;
}
public virtual void ContextSensitiveHelp(bool fEnterMode){}
/// <summary>
/// Called by explorer when band object needs to be showed or hidden.
/// </summary>
/// <param name="fShow"></param>
public virtual void ShowDW(bool fShow)
{
if (fShow)
Show();
else
Hide();
}
/// <summary>
/// Called by explorer when window is about to close.
/// </summary>
public virtual void CloseDW(UInt32 dwReserved)
{
Dispose(true);
}
/// <summary>
/// Not used.
/// </summary>
public virtual void ResizeBorderDW(IntPtr prcBorder, Object punkToolbarSite, bool fReserved) { }
public virtual void GetBandInfo(UInt32 dwBandID, UInt32 dwViewMode, ref DESKBANDINFO dbi)
{
if ((dbi.dwMask & DBIM.MINSIZE) != 0)
{
dbi.ptMinSize.X = MinSize.Width;
dbi.ptMinSize.Y = MinSize.Height;
}
if ((dbi.dwMask & DBIM.MAXSIZE) != 0)
{
dbi.ptMaxSize.X = MaxSize.Width;
dbi.ptMaxSize.Y = MaxSize.Height;
}
if ((dbi.dwMask & DBIM.INTEGRAL) != 0)
{
dbi.ptIntegral.X = IntegralSize.Width;
dbi.ptIntegral.Y = IntegralSize.Height;
}
if ((dbi.dwMask & DBIM.ACTUAL) != 0)
{
dbi.ptActual.X = Size.Width;
dbi.ptActual.Y = Size.Height;
}
if ((dbi.dwMask & DBIM.TITLE) != 0)
{
dbi.wszTitle = Title;
}
//Use the default background color by removing this flag
dbi.dwMask &= ~DBIM.BKCOLOR;
//COLORREF bkColor;
//bkColor.R = Color.Black.R;
//bkColor.G = Color.Black.G;
//bkColor.B = Color.Black.B;
//Color.to
//dbi.crBkgnd = Int32.MaxValue;
//dbi.crBkgnd = 0xDEDEDE;
dbi.dwModeFlags = (DBIMF)DBIM.TITLE | (DBIMF)DBIM.ACTUAL | (DBIMF)DBIM.MAXSIZE | (DBIMF)DBIM.MINSIZE | (DBIMF)DBIM.INTEGRAL;
dbi.dwModeFlags = dbi.dwModeFlags | DBIMF.ALWAYSGRIPPER | DBIMF.VARIABLEHEIGHT | DBIMF.ADDTOFRONT;
}
#endregion
#region IDeskBand2
public void CanRenderComposited(ref bool pfCanRenderComposited)
{
pfCanRenderComposited = true;
}
public void GetCompositionState(ref bool pfCompositionEnabled)
{
pfCompositionEnabled = _compositionEnabled;
}
public void SetCompositionState(bool fCompositionEnabled)
{
_compositionEnabled = fCompositionEnabled;
}
#endregion
#region IInputObject
/// <summary>
/// Called explorer when focus has to be chenged.
/// </summary>
public virtual void UIActivateIO(Int32 fActivate, ref MSG Msg)
{
if( fActivate != 0 )
{
Control ctrl = GetNextControl(this,true);//first
if( ModifierKeys == Keys.Shift )
ctrl = GetNextControl(ctrl,false );//last
if( ctrl != null ) ctrl.Select();
this.Focus();
}
}
public virtual Int32 HasFocusIO()
{
return this.ContainsFocus ? 0 : 1; //S_OK : S_FALSE;
}
/// <summary>
/// Called by explorer to process keyboard events. Undersatands Tab and F6.
/// </summary>
/// <param name="msg"></param>
/// <returns>S_OK if message was processed, S_FALSE otherwise.</returns>
public virtual Int32 TranslateAcceleratorIO(ref MSG msg)
{
if( msg.message == 0x100 )//WM_KEYDOWN
if( msg.wParam == (uint)Keys.Tab || msg.wParam == (uint)Keys.F6 )//keys used by explorer to navigate from control to control
if( SelectNextControl(
ActiveControl,
ModifierKeys == Keys.Shift ? false : true,
true,
true,
false )
)
return 0;//S_OK
return 1;//S_FALSE
}
#endregion
#region EventHandlers
/// <summary>
/// Override this method to handle ExplorerAttached event.
/// </summary>
/// <param name="ea"></param>
protected virtual void OnExplorerAttached(EventArgs ea)
{
if ( ExplorerAttached != null )
ExplorerAttached(this, ea);
}
/// <summary>
/// Notifies explorer of focus change.
/// </summary>
protected override void OnGotFocus(System.EventArgs e)
{
base.OnGotFocus(e);
BandObjectSite.OnFocusChangeIS(this as IInputObject, 1);
}
/// <summary>
/// Notifies explorer of focus change.
/// </summary>
protected override void OnLostFocus(System.EventArgs e)
{
base.OnLostFocus(e);
if( ActiveControl == null )
BandObjectSite.OnFocusChangeIS(this as IInputObject, 0);
}
#endregion
#region COM_Bookkeeping
/// <summary>
/// Called when derived class is registered as a COM server.
/// </summary>
[ComRegisterFunctionAttribute]
public static void Register(Type t)
{
string guid = t.GUID.ToString("B");
RegistryKey rkClass = Registry.ClassesRoot.CreateSubKey(@"CLSID\"+guid );
RegistryKey rkCat = rkClass.CreateSubKey("Implemented Categories");
BandObjectAttribute[] boa = (BandObjectAttribute[])t.GetCustomAttributes(
typeof(BandObjectAttribute),
false );
string name = t.Name;
string help = t.Name;
BandObjectStyle style = 0;
if( boa.Length == 1 )
{
if( boa[0].Name != null )
name = boa[0].Name;
if( boa[0].HelpText != null )
help = boa[0].HelpText;
style = boa[0].Style;
}
rkClass.SetValue(null, name );
rkClass.SetValue("MenuText", name );
rkClass.SetValue("HelpText", help );
if( 0 != (style & BandObjectStyle.Vertical) )
rkCat.CreateSubKey("{00021493-0000-0000-C000-000000000046}");
if( 0 != (style & BandObjectStyle.Horizontal) )
rkCat.CreateSubKey("{00021494-0000-0000-C000-000000000046}");
if( 0 != (style & BandObjectStyle.TaskbarToolBar) )
rkCat.CreateSubKey("{00021492-0000-0000-C000-000000000046}");
if( 0 != (style & BandObjectStyle.ExplorerToolbar) )
Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Internet Explorer\Toolbar").SetValue(guid,name);
}
/// <summary>
/// Called when derived class is unregistered as a COM server.
/// </summary>
[ComUnregisterFunctionAttribute]
public static void Unregister(Type t)
{
string guid = t.GUID.ToString("B");
BandObjectAttribute[] boa = (BandObjectAttribute[])t.GetCustomAttributes(
typeof(BandObjectAttribute),
false );
BandObjectStyle style = 0;
if( boa.Length == 1 ) style = boa[0].Style;
if( 0 != (style & BandObjectStyle.ExplorerToolbar) )
Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Internet Explorer\Toolbar").DeleteValue(guid,false);
Registry.ClassesRoot.CreateSubKey(@"CLSID").DeleteSubKeyTree(guid);
}
#endregion
#region Properties
/// <summary>
/// Title of band object. Displayed at the left or on top of the band object.
/// </summary>
[Browsable(true)]
[DefaultValue("")]
public String Title
{
get
{
return _title;
}
set
{
_title = value;
}
}
/// <summary>
/// Minimum size of the band object. Default value of -1 sets no minimum constraint.
/// </summary>
[Browsable(true)]
[DefaultValue(typeof(Size), "-1,-1")]
public Size MinSize
{
get
{
return _minSize;
}
set
{
_minSize = value;
}
}
/// <summary>
/// Maximum size of the band object. Default value of -1 sets no maximum constraint.
/// </summary>
[Browsable(true)]
[DefaultValue(typeof(Size), "-1,-1")]
public Size MaxSize
{
get
{
return _maxSize;
}
set
{
_maxSize = value;
}
}
/// <summary>
/// Says that band object's size must be multiple of this size. Defauilt value of -1 does not set this constraint.
/// </summary>
[Browsable(true)]
[DefaultValue(typeof(Size), "-1,-1")]
public Size IntegralSize
{
get
{
return _integralSize;
}
set
{
_integralSize = value;
}
}
#endregion
#region Member Variables
/// <summary>
/// This event is fired after reference to hosting explorer is retreived and stored in Explorer property.
/// </summary>
public event EventHandler ExplorerAttached;
protected WebBrowserClass Explorer;
protected IInputObjectSite BandObjectSite;
private bool _compositionEnabled = true;
private String _title;
private Size _minSize = new Size(-1, -1);
private Size _integralSize = new Size(-1, -1);
private Size _maxSize = new Size(-1, -1);
#endregion
}
}

View File

@@ -0,0 +1,157 @@
<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BDB3B670-A17B-483E-954C-52FC2B6FF9D3}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>Foo.BandObject</AssemblyName>
<AssemblyOriginatorKeyFile>BandObjects.snk</AssemblyOriginatorKeyFile>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<RootNamespace>Foo.Deskband.BandObject</RootNamespace>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>0.0</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<SignAssembly>true</SignAssembly>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>..\..\Target\Debug\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>..\..\Target\Release\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>false</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>true</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Drawing">
<Name>System.Drawing</Name>
</Reference>
<Reference Include="System.Windows.Forms">
<Name>System.Windows.Forms</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Attributes.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="BandObject.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="ComInterop.cs">
<SubType>Code</SubType>
</Compile>
<EmbeddedResource Include="BandObject.resx">
<DependentUpon>BandObject.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<Visible>False</Visible>
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
<Visible>False</Visible>
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<COMReference Include="SHDocVw">
<Guid>{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>1</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
</ItemGroup>
<ItemGroup>
<None Include="BandObjects.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>"$(FrameworkSDKDir)bin\gacutil.exe" /if "$(SolutionDir)target\$(ConfigurationName)\$(TargetFileName)"
"$(FrameworkSDKDir)bin\gacutil.exe" /if "$(SolutionDir)target\$(ConfigurationName)\Interop.SHDocVw.dll"
</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,120 @@
<?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>
</root>

View File

@@ -0,0 +1,55 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BandObjectLib", "BandObjectLib.csproj", "{BDB3B670-A17B-483E-954C-52FC2B6FF9D3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RegisterLib", "RegisterLib\RegisterLib.vcproj", "{E35915FE-ED91-4AE5-B566-F269CD854498}"
ProjectSection(ProjectDependencies) = postProject
{BDB3B670-A17B-483E-954C-52FC2B6FF9D3} = {BDB3B670-A17B-483E-954C-52FC2B6FF9D3}
EndProjectSection
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 3
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = http://myhome.romischer.com:8080/
SccLocalPath0 = .
SccProjectUniqueName1 = BandObjectLib.csproj
SccLocalPath1 = .
SccProjectUniqueName2 = RegisterLib\\RegisterLib.vcproj
SccProjectName2 = RegisterLib
SccLocalPath2 = RegisterLib
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BDB3B670-A17B-483E-954C-52FC2B6FF9D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BDB3B670-A17B-483E-954C-52FC2B6FF9D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BDB3B670-A17B-483E-954C-52FC2B6FF9D3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{BDB3B670-A17B-483E-954C-52FC2B6FF9D3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{BDB3B670-A17B-483E-954C-52FC2B6FF9D3}.Debug|Win32.ActiveCfg = Debug|Any CPU
{BDB3B670-A17B-483E-954C-52FC2B6FF9D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BDB3B670-A17B-483E-954C-52FC2B6FF9D3}.Release|Any CPU.Build.0 = Release|Any CPU
{BDB3B670-A17B-483E-954C-52FC2B6FF9D3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{BDB3B670-A17B-483E-954C-52FC2B6FF9D3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{BDB3B670-A17B-483E-954C-52FC2B6FF9D3}.Release|Win32.ActiveCfg = Release|Any CPU
{E35915FE-ED91-4AE5-B566-F269CD854498}.Debug|Any CPU.ActiveCfg = Debug|Win32
{E35915FE-ED91-4AE5-B566-F269CD854498}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{E35915FE-ED91-4AE5-B566-F269CD854498}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{E35915FE-ED91-4AE5-B566-F269CD854498}.Debug|Win32.ActiveCfg = Debug|Win32
{E35915FE-ED91-4AE5-B566-F269CD854498}.Debug|Win32.Build.0 = Debug|Win32
{E35915FE-ED91-4AE5-B566-F269CD854498}.Release|Any CPU.ActiveCfg = Release|Win32
{E35915FE-ED91-4AE5-B566-F269CD854498}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{E35915FE-ED91-4AE5-B566-F269CD854498}.Release|Mixed Platforms.Build.0 = Release|Win32
{E35915FE-ED91-4AE5-B566-F269CD854498}.Release|Win32.ActiveCfg = Release|Win32
{E35915FE-ED91-4AE5-B566-F269CD854498}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

View File

@@ -0,0 +1,246 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace Foo.Deskband.BandObject
{
abstract class ExplorerGUIDs
{
public static readonly Guid IID_IWebBrowserApp = new Guid("{0002DF05-0000-0000-C000-000000000046}");
public static readonly Guid IID_IUnknown = new Guid("{00000000-0000-0000-C000-000000000046}");
}
[Flags]
public enum DBIM : uint
{
MINSIZE = 0x0001,
MAXSIZE = 0x0002,
INTEGRAL = 0x0004,
ACTUAL = 0x0008,
TITLE = 0x0010,
MODEFLAGS = 0x0020,
BKCOLOR = 0x0040,
}
[Flags]
public enum DBIMF : uint
{
NORMAL = 0x0001,
FIXED = 0x0002,
FIXEDBMP = 0x0004,
VARIABLEHEIGHT = 0x0008,
UNDELETEABLE = 0x0010,
DEBOSSED = 0x0020,
BKCOLOR = 0x0040,
USECHEVRON = 0x0080,
BREAK = 0x0100,
ADDTOFRONT = 0x0200,
TOPALIGN = 0x0400,
NOGRIPPER = 0x0800,
ALWAYSGRIPPER = 0x1000,
NOMARGINS = 0x2000,
}
[Flags]
public enum DBIF : uint
{
VIEWMODE_NORMAL = 0x0000,
VIEWMODE_VERTICAL = 0x0001,
VIEWMODE_FLOATING = 0x0002,
VIEWMODE_TRANSPARENT = 0x0004
}
[StructLayout(LayoutKind.Sequential,CharSet=CharSet.Unicode)]
public struct DESKBANDINFO
{
public DBIM dwMask;
public Point ptMinSize;
public Point ptMaxSize;
public Point ptIntegral;
public Point ptActual;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=255)]
public String wszTitle;
public DBIMF dwModeFlags;
public Int32 crBkgnd;
};
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CMINVOKECOMMANDINFO
{
uint cbSize;
uint fMask;
IntPtr hwnd;
string lpVerb;
string lpParameters;
string lpDirectory;
int nShow;
uint dwHotKey;
IntPtr hIcon;
};
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("FC4801A3-2BA9-11CF-A229-00AA003D7352")]
public interface IObjectWithSite
{
void SetSite([In ,MarshalAs(UnmanagedType.IUnknown)] Object pUnkSite);
void GetSite(ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out Object ppvSite);
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("00000114-0000-0000-C000-000000000046")]
public interface IOleWindow
{
void GetWindow(out System.IntPtr phwnd);
void ContextSensitiveHelp([In] bool fEnterMode);
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("012dd920-7b26-11d0-8ca9-00a0c92dbfe8")]
public interface IDockingWindow
{
void GetWindow(out System.IntPtr phwnd);
void ContextSensitiveHelp([In] bool fEnterMode);
void ShowDW([In] bool fShow);
void CloseDW([In] UInt32 dwReserved);
void ResizeBorderDW(
IntPtr prcBorder,
[In, MarshalAs(UnmanagedType.IUnknown)] Object punkToolbarSite,
bool fReserved);
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("EB0FE172-1A3A-11D0-89B3-00A0C90A90AC")]
public interface IDeskBand
{
void GetWindow(out System.IntPtr phwnd);
void ContextSensitiveHelp([In] bool fEnterMode);
void ShowDW([In] bool fShow);
void CloseDW([In] UInt32 dwReserved);
void ResizeBorderDW(
IntPtr prcBorder,
[In, MarshalAs(UnmanagedType.IUnknown)] Object punkToolbarSite,
bool fReserved);
void GetBandInfo(
UInt32 dwBandID,
UInt32 dwViewMode,
ref DESKBANDINFO pdbi);
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
[Guid("79D16DE4-ABEE-4021-8D9D-9169B261D657")]
public interface IDeskBand2
{
void GetBandInfo(UInt32 dwBandID, UInt32 dwViewMode, ref DESKBANDINFO pdbi);
void CanRenderComposited(ref bool pfCanRenderComposited);
void GetCompositionState(ref bool pfCompositionEnabled);
void SetCompositionState([MarshalAs(UnmanagedType.Bool)] bool fCompositionEnabled);
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("0000010c-0000-0000-C000-000000000046")]
public interface IPersist
{
void GetClassID(out Guid pClassID);
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("00000109-0000-0000-C000-000000000046")]
public interface IPersistStream
{
void GetClassID(out Guid pClassID);
void IsDirty ();
void Load ([In, MarshalAs(UnmanagedType.Interface)] Object pStm);
void Save ([In, MarshalAs(UnmanagedType.Interface)] Object pStm,
[In] bool fClearDirty);
void GetSizeMax ([Out] out UInt64 pcbSize);
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("6d5140c1-7436-11ce-8034-00aa006009fa")]
public interface _IServiceProvider
{
void QueryService(
ref Guid guid,
ref Guid riid,
[MarshalAs(UnmanagedType.Interface)] out Object Obj);
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("68284faa-6a48-11d0-8c78-00c04fd918b4")]
public interface IInputObject
{
void UIActivateIO(Int32 fActivate, ref MSG msg);
[PreserveSig]
//[return:MarshalAs(UnmanagedType.Error)]
Int32 HasFocusIO();
[PreserveSig]
Int32 TranslateAcceleratorIO(ref MSG msg);
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("000214e4-0000-0000-c000-000000000046")]
public interface IContextMenu
{
[PreserveSig()]
int QueryContextMenu(uint hmenu, uint indexMenu, int idCmdFirst, int idCmdLast, uint uFlags);
[PreserveSig()]
void InvokeCommand (IntPtr pici);
[PreserveSig()]
void GetCommandString(int idCmd, uint uFlags, int reserved, string name, int cchMax);
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("f1db8392-7331-11d0-8c99-00a0c92dbfe8")]
public interface IInputObjectSite
{
[PreserveSig]
Int32 OnFocusChangeIS( [MarshalAs(UnmanagedType.IUnknown)] Object punkObj, Int32 fSetFocus);
}
public struct POINT
{
public Int32 x;
public Int32 y;
}
public struct MSG
{
public IntPtr hwnd;
public UInt32 message;
public UInt32 wParam;
public Int32 lParam;
public UInt32 time;
public POINT pt;
}
}

View File

@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="RegisterLib"
ProjectGUID="{A6903D99-B950-4D1A-B715-0B808ED64376}"
RootNamespace="RegisterLib"
SccProjectName="SAK"
SccAuxPath="SAK"
SccLocalPath="SAK"
SccProvider="SAK"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="10"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="cd $(ProjectDir)..\bin\Debug&#x0D;&#x0A;&#x0D;&#x0A;gacutil /if Ooganizer.Client.UI.BandObject.dll&#x0D;&#x0A;gacutil /if SHDocVw.dll&#x0D;&#x0A;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="10"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="cd $(ProjectDir)..\bin\Release&#x0D;&#x0A;&#x0D;&#x0A;gacutil /if BandObjectLib.dll&#x0D;&#x0A;gacutil /if Interop.SHDocVw.dll&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>