dotnet / pinvoke

A library containing all P/Invoke code so you don't have to import it every time. Maintained and updated to support the latest Windows OS.
MIT License
2.12k stars 222 forks source link

Object ID constants from WinUser.h #522

Closed jrimig closed 1 year ago

jrimig commented 4 years ago

WinUser.h defines object ID constants (e.g. OBJID_WINDOW, OBJID_SYSMENU, etc) that are useful when implementing the WinEventProc delegate defined in User32.cs. Here is how I define them in my code. Are these constants something that can be a part of this project?

public const int OBJID_WINDOW               =   0;
public const int OBJID_SYSMENU              =  -1;
public const int OBJID_TITLEBAR             =  -2;
public const int OBJID_MENU                 =  -3;
public const int OBJID_CLIENT               =  -4;
public const int OBJID_VSCROLL              =  -5;
public const int OBJID_HSCROLL              =  -6;
public const int OBJID_SIZEGRIP             =  -7;
public const int OBJID_CARET                =  -8;
public const int OBJID_CURSOR               =  -9;
public const int OBJID_ALERT                = -10;
public const int OBJID_SOUND                = -11;
public const int OBJID_QUERYCLASSNAMEIDX    = -12;
public const int OBJID_NATIVEOM             = -13;