WindowClass.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Runtime.InteropServices;
  3. namespace Hardcodet.Wpf.TaskbarNotification.Interop
  4. {
  5. /// <summary>
  6. /// Callback delegate which is used by the Windows API to
  7. /// submit window messages.
  8. /// </summary>
  9. public delegate IntPtr WindowProcedureHandler(IntPtr hWnd, uint uMsg, IntPtr wParam, IntPtr lParam);
  10. /// <summary>
  11. /// Win API WNDCLASS struct - represents a single window.
  12. /// Used to receive window messages.
  13. /// </summary>
  14. [StructLayout(LayoutKind.Sequential)]
  15. public struct WindowClass
  16. {
  17. #pragma warning disable 1591
  18. public uint style;
  19. public WindowProcedureHandler lpfnWndProc;
  20. public int cbClsExtra;
  21. public int cbWndExtra;
  22. public IntPtr hInstance;
  23. public IntPtr hIcon;
  24. public IntPtr hCursor;
  25. public IntPtr hbrBackground;
  26. [MarshalAs(UnmanagedType.LPWStr)] public string lpszMenuName;
  27. [MarshalAs(UnmanagedType.LPWStr)] public string lpszClassName;
  28. #pragma warning restore 1591
  29. }
  30. }