Atom?

  • Thread starter Thread starter Sean Dudley
  • Start date Start date
S

Sean Dudley

I need to run an API call that requires a WNDCLASS. How do I construct this
in c#?

I want to use RegisterClass. See, I want to register a TrayNotifyWnd class,
etc so when a window seeks to have an icon in the tray my class will receive
the event.

Any ideas?
 
Sean,
I need to run an API call that requires a WNDCLASS. How do I construct this
in c#?

Something like

[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
struct WNDCLASS
{
public uint style;
public Delegate lpfnWndProc;
public int cbClsExtra;
public int cbWndExtra;
public IntPtr hInstance;
public IntPtr hIcon;
public IntPtr hCursor;
public IntPtr hbrBackground;
public string lpszMenuName;
public string lpszClassName;
}


See, I want to register a TrayNotifyWnd class,
etc so when a window seeks to have an icon in the tray my class will receive
the event.

Why don't you just use the NotifyIcon component?



Mattias
 
Back
Top