Statistics
| Branch: | Revision:

root / trunk / NotifyIconWpf / Interop / WindowClass.cs @ 9bae55d1

History | View | Annotate | Download (912 Bytes)

1
using System;
2
using System.Runtime.InteropServices;
3

    
4
namespace Hardcodet.Wpf.TaskbarNotification.Interop
5
{
6
  /// <summary>
7
  /// Callback delegate which is used by the Windows API to
8
  /// submit window messages.
9
  /// </summary>
10
  public delegate long WindowProcedureHandler(IntPtr hwnd, uint uMsg, uint wparam, uint lparam);
11

    
12

    
13
  /// <summary>
14
  /// Win API WNDCLASS struct - represents a single window.
15
  /// Used to receive window messages.
16
  /// </summary>
17
  [StructLayout(LayoutKind.Sequential)]
18
  public struct WindowClass
19
  {
20
    public uint style;
21
    public WindowProcedureHandler lpfnWndProc;
22
    public int cbClsExtra;
23
    public int cbWndExtra;
24
    public IntPtr hInstance;
25
    public IntPtr hIcon;
26
    public IntPtr hCursor;
27
    public IntPtr hbrBackground;
28
    [MarshalAs(UnmanagedType.LPWStr)] public string lpszMenuName;
29
    [MarshalAs(UnmanagedType.LPWStr)] public string lpszClassName;
30
  }
31
}