zoukankan      html  css  js  c++  java
  • C#可以直接调用的Win32API(和VCL做的整理工作非常类似)

    以前整理的Win32 API,可以直接在C#中直接调用,在做WinForm时还是很有帮助的。以前用在一个多窗口界面中,当轮询窗口时,调用API会提高很多效率。 

    源码下载 
    http://files.cnblogs.com/lordeo/win32api.rar 

    整理的Win32 API,可以直接在C#中直接调用,在做WinForm时还是很有帮助的。

    源码包含三个文件

    Win32API.cs,

    [csharp] view plain copy
     
    1. using System;  
    2. using System.Drawing;  
    3. using System.Runtime.InteropServices;  
    4. using Lordal.Window.Form.Lib.General;  
    5. using Lordal.Window.Form.Lib.Win32;  
    6.   
    7. namespace Lordeo.Framework  
    8. {  
    9.     /// <summary>  
    10.     /// Windows API Functions  
    11.     /// </summary>  
    12.     public class Win32API  
    13.     {  
    14.         #region .ctor()  
    15.         // No need to construct this object  
    16.         private Win32API()  
    17.         {  
    18.         }  
    19.         #endregion  
    20.          
    21.         #region Constans values  
    22.         public const string TOOLBARCLASSNAME = "ToolbarWindow32";  
    23.         public const string REBARCLASSNAME = "ReBarWindow32";  
    24.         public const string PROGRESSBARCLASSNAME = "msctls_progress32";  
    25.         public const string SCROLLBAR = "SCROLLBAR";  
    26.         #endregion  
    27.  
    28.         #region CallBacks  
    29.         public delegate IntPtr HookProc(int nCode, IntPtr wParam, IntPtr lParam);  
    30.         #endregion  
    31.  
    32.         #region Kernel32.dll functions  
    33.         [DllImport("kernel32.dll", ExactSpelling=true, CharSet=CharSet.Auto)]  
    34.             public static extern int GetCurrentThreadId();  
    35.         #endregion  
    36.      
    37.         #region Gdi32.dll functions  
    38.         [DllImport("gdi32.dll")]  
    39.             static public extern bool StretchBlt(IntPtr hDCDest, int XOriginDest, int YOriginDest, int WidthDest, int HeightDest,  
    40.             IntPtr hDCSrc,  int XOriginScr, int YOriginSrc, int WidthScr, int HeightScr, uint Rop);  
    41.         [DllImport("gdi32.dll")]  
    42.             static public extern IntPtr CreateCompatibleDC(IntPtr hDC);  
    43.         [DllImport("gdi32.dll")]  
    44.             static public extern IntPtr CreateCompatibleBitmap(IntPtr hDC, int Width, int Heigth);  
    45.         [DllImport("gdi32.dll")]  
    46.             static public extern IntPtr SelectObject(IntPtr hDC, IntPtr hObject);  
    47.         [DllImport("gdi32.dll")]  
    48.             static public extern bool BitBlt(IntPtr hDCDest, int XOriginDest, int YOriginDest, int WidthDest, int HeightDest,  
    49.             IntPtr hDCSrc,  int XOriginScr, int YOriginSrc, uint Rop);  
    50.         [DllImport("gdi32.dll")]  
    51.             static public extern IntPtr DeleteDC(IntPtr hDC);  
    52.         [DllImport("gdi32.dll")]  
    53.             static public extern bool PatBlt(IntPtr hDC, int XLeft, int YLeft, int Width, int Height, uint Rop);  
    54.         [DllImport("gdi32.dll")]  
    55.             static public extern bool DeleteObject(IntPtr hObject);  
    56.         [DllImport("gdi32.dll")]  
    57.             static public extern uint GetPixel(IntPtr hDC, int XPos, int YPos);  
    58.         [DllImport("gdi32.dll")]  
    59.             static public extern int SetMapMode(IntPtr hDC, int fnMapMode);  
    60.         [DllImport("gdi32.dll")]  
    61.             static public extern int GetObjectType(IntPtr handle);  
    62.         [DllImport("gdi32")]  
    63.             public static extern IntPtr CreateDIBSection(IntPtr hdc, ref BITMAPINFO_FLAT bmi,   
    64.             int iUsage, ref int ppvBits, IntPtr hSection, int dwOffset);  
    65.         [DllImport("gdi32")]  
    66.             public static extern int GetDIBits(IntPtr hDC, IntPtr hbm, int StartScan, int ScanLines, int lpBits, BITMAPINFOHEADER bmi, int usage);  
    67.         [DllImport("gdi32")]  
    68.             public static extern int GetDIBits(IntPtr hdc, IntPtr hbm, int StartScan, int ScanLines, int lpBits, ref BITMAPINFO_FLAT bmi, int usage);  
    69.         [DllImport("gdi32")]  
    70.             public static extern IntPtr GetPaletteEntries(IntPtr hpal, int iStartIndex, int nEntries, byte[] lppe);  
    71.         [DllImport("gdi32")]  
    72.             public static extern IntPtr GetSystemPaletteEntries(IntPtr hdc, int iStartIndex, int nEntries, byte[] lppe);  
    73.         [DllImport("gdi32")]  
    74.             public static extern uint SetDCBrushColor(IntPtr hdc,  uint crColor);  
    75.         [DllImport("gdi32")]  
    76.             public static extern IntPtr CreateSolidBrush(uint crColor);  
    77.         [DllImport("gdi32")]  
    78.             public static extern int SetBkMode(IntPtr hDC, BackgroundMode mode);  
    79.         [DllImport("gdi32")]  
    80.             public static extern int SetViewportOrgEx(IntPtr hdc,  int x, int y,  int param);  
    81.         [DllImport("gdi32")]  
    82.             public static extern uint SetTextColor(IntPtr hDC, uint colorRef);  
    83.         [DllImport("gdi32")]  
    84.             public static extern int SetStretchBltMode(IntPtr hDC, int StrechMode);  
    85.         #endregion  
    86.  
    87.         #region Uxtheme.dll functions  
    88.         [DllImport("uxtheme.dll")]  
    89.         static public extern int SetWindowTheme(IntPtr hWnd, string AppID, string ClassID);  
    90.         #endregion  
    91.      
    92.         #region User32.dll functions  
    93.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    94.             public static extern IntPtr GetDC(IntPtr hWnd);  
    95.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    96.             public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);  
    97.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    98.             static public extern IntPtr GetDesktopWindow();  
    99.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    100.             static public extern bool ShowWindow(IntPtr hWnd, short State);  
    101.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    102.             static public extern bool UpdateWindow(IntPtr hWnd);  
    103.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    104.             static public extern bool SetForegroundWindow(IntPtr hWnd);  
    105.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    106.             static public extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int Width, int Height, uint flags);  
    107.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    108.             static public extern bool OpenClipboard(IntPtr hWndNewOwner);  
    109.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    110.             static public extern bool CloseClipboard();  
    111.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    112.             static public extern bool EmptyClipboard();  
    113.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    114.             static public extern IntPtr SetClipboardData( uint Format, IntPtr hData);  
    115.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    116.             static public extern bool GetMenuItemRect(IntPtr hWnd, IntPtr hMenu, uint Item, ref RECT rc);  
    117.         [DllImport("user32.dll", ExactSpelling=true, CharSet=CharSet.Auto)]  
    118.             public static extern IntPtr GetParent(IntPtr hWnd);  
    119.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    120.             public static extern int SendMessage(IntPtr hWnd, int msg, int wParam, int lParam);  
    121.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    122.             public static extern IntPtr SendMessage(IntPtr hWnd, int msg, int wParam, IntPtr lParam);  
    123.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    124.             public static extern void SendMessage(IntPtr hWnd, int msg, int wParam, ref RECT lParam);  
    125.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    126.             public static extern int SendMessage(IntPtr hWnd, int msg, int wParam, ref POINT lParam);  
    127.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    128.             public static extern void SendMessage(IntPtr hWnd, int msg, int wParam, ref TBBUTTON lParam);  
    129.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    130.             public static extern void SendMessage(IntPtr hWnd, int msg, int wParam, ref TBBUTTONINFO lParam);  
    131.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    132.             public static extern int SendMessage(IntPtr hWnd, int msg, int wParam, ref REBARBANDINFO lParam);  
    133.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    134.             public static extern void SendMessage(IntPtr hWnd, int msg, int wParam, ref TVITEM lParam);  
    135.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    136.             public static extern void SendMessage(IntPtr hWnd, int msg, int wParam, ref LVITEM lParam);  
    137.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    138.             public static extern void SendMessage(IntPtr hWnd, int msg, int wParam, ref HDITEM lParam);  
    139.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    140.             public static extern void SendMessage(IntPtr hWnd, int msg, int wParam, ref HD_HITTESTINFO hti);  
    141.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    142.             public static extern IntPtr PostMessage(IntPtr hWnd, int msg, int wParam, int lParam);  
    143.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    144.             public static extern IntPtr SetWindowsHookEx(int hookid, HookProc pfnhook, IntPtr hinst, int threadid);  
    145.         [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]  
    146.             public static extern bool UnhookWindowsHookEx(IntPtr hhook);  
    147.         [DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]  
    148.             public static extern IntPtr CallNextHookEx(IntPtr hhook, int code, IntPtr wparam, IntPtr lparam);  
    149.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    150.             public static extern IntPtr SetFocus(IntPtr hWnd);  
    151.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    152.             public extern static int DrawText(IntPtr hdc, string lpString, int nCount, ref RECT lpRect, int uFormat);  
    153.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    154.             public extern static IntPtr SetParent(IntPtr hChild, IntPtr hParent);  
    155.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    156.             public extern static IntPtr GetDlgItem(IntPtr hDlg, int nControlID);  
    157.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    158.             public extern static int GetClientRect(IntPtr hWnd, ref RECT rc);  
    159.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    160.             public extern static int InvalidateRect(IntPtr hWnd,  IntPtr rect, int bErase);  
    161.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    162.             public static extern bool WaitMessage();  
    163.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    164.             public static extern bool PeekMessage(ref MSG msg, int hWnd, uint wFilterMin, uint wFilterMax, uint wFlag);  
    165.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    166.             public static extern bool GetMessage(ref MSG msg, int hWnd, uint wFilterMin, uint wFilterMax);  
    167.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    168.             public static extern bool TranslateMessage(ref MSG msg);  
    169.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    170.             public static extern bool DispatchMessage(ref MSG msg);  
    171.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    172.             public static extern IntPtr LoadCursor(IntPtr hInstance, uint cursor);  
    173.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    174.             public static extern IntPtr SetCursor(IntPtr hCursor);  
    175.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    176.             public static extern IntPtr GetFocus();  
    177.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    178.             public static extern bool ReleaseCapture();  
    179.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    180.             public static extern IntPtr BeginPaint(IntPtr hWnd, ref PAINTSTRUCT ps);  
    181.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    182.             public static extern bool EndPaint(IntPtr hWnd, ref PAINTSTRUCT ps);  
    183.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    184.             public static extern bool UpdateLayeredWindow(IntPtr hwnd, IntPtr hdcDst, ref POINT pptDst, ref SIZE psize, IntPtr hdcSrc, ref POINT pprSrc, Int32 crKey, ref BLENDFUNCTION pblend, Int32 dwFlags);  
    185.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    186.             public static extern bool GetWindowRect(IntPtr hWnd, ref RECT rect);  
    187.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    188.             public static extern bool ClientToScreen(IntPtr hWnd, ref POINT pt);  
    189.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    190.             public static extern bool TrackMouseEvent(ref TRACKMOUSEEVENTS tme);  
    191.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    192.             public static extern bool SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool redraw);  
    193.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    194.             public static extern ushort GetKeyState(int virtKey);  
    195.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    196.             public static extern bool MoveWindow(IntPtr hWnd, int x, int y, int width, int height, bool repaint);  
    197.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    198.             public static extern int GetClassName(IntPtr hWnd,  out STRINGBUFFER ClassName, int nMaxCount);  
    199.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    200.             public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);  
    201.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    202.             public static extern IntPtr GetDCEx(IntPtr hWnd, IntPtr hRegion, uint flags);  
    203.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    204.             public static extern IntPtr GetWindowDC(IntPtr hWnd);  
    205.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    206.             public static extern int FillRect(IntPtr hDC, ref RECT rect, IntPtr hBrush);  
    207.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    208.             public static extern int GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT wp);  
    209.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    210.             public static extern int SetWindowText(IntPtr hWnd, string text);  
    211.         [DllImport("User32.dll", CharSet=CharSet.Auto)]  
    212.             public static extern int GetWindowText(IntPtr hWnd, out STRINGBUFFER text, int maxCount);  
    213.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    214.             static public extern int SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);   
    215.         [DllImport("user32.dll", CharSet=CharSet.Auto)]   
    216.             static public extern IntPtr SetClipboardViewer(IntPtr hWndNewViewer);   
    217.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    218.             static public extern int ChangeClipboardChain(IntPtr hWndRemove, IntPtr hWndNewNext);  
    219.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    220.             static public extern int GetSystemMetrics(int nIndex);  
    221.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    222.             static public extern int SetScrollInfo(IntPtr hwnd,  int bar, ref SCROLLINFO si, int fRedraw);  
    223.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    224.             public static extern int ShowScrollBar(IntPtr hWnd, int bar,  int show);  
    225.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    226.             public static extern int EnableScrollBar(IntPtr hWnd, uint flags, uint arrows);  
    227.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    228.             public static extern int BringWindowToTop(IntPtr hWnd);  
    229.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    230.             public static extern int GetScrollInfo(IntPtr hwnd, int bar, ref SCROLLINFO si);  
    231.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    232.         static public extern int ScrollWindowEx(IntPtr hWnd, int dx, int dy,   
    233.             ref RECT rcScroll, ref RECT rcClip, IntPtr UpdateRegion, ref RECT rcInvalidated, uint flags);  
    234.         [DllImport("user32.dll", CharSet=CharSet.Auto)]  
    235.             public static extern int IsWindow(IntPtr hWnd);  
    236.         [DllImport("user32",CharSet=CharSet.Auto)]   
    237.             public static extern int GetKeyboardState(byte[] pbKeyState);  
    238.         [DllImport("user32")]   
    239.         public static extern int ToAscii(int uVirtKey, //[in] Specifies the virtual-key code to be translated.   
    240.             int uScanCode, // [in] Specifies the hardware scan code of the key to be translated. The high-order bit of this value is set if the key is up (not pressed).   
    241.             byte[] lpbKeyState, // [in] Pointer to a 256-byte array that contains the current keyboard state. Each element (byte) in the array contains the state of one key. If the high-order bit of a byte is set, the key is down (pressed). The low bit, if set, indicates that the key is toggled on. In this function, only the toggle bit of the CAPS LOCK key is relevant. The toggle state of the NUM LOCK and SCROLL LOCK keys is ignored.  
    242.             byte[] lpwTransKey, // [out] Pointer to the buffer that receives the translated character or characters.   
    243.             int fuState); // [in] Specifies whether a menu is active. This parameter must be 1 if a menu is active, or 0 otherwise.  
    244.         #endregion  
    245.  
    246.         #region Common Controls functions  
    247.         [DllImport("comctl32.dll")]  
    248.             public static extern bool InitCommonControlsEx(INITCOMMONCONTROLSEX icc);  
    249.         [DllImport("comctl32.dll")]  
    250.             public static extern bool InitCommonControls();  
    251.         [DllImport("comctl32.dll", EntryPoint="DllGetVersion")]  
    252.             public extern static int GetCommonControlDLLVersion(ref DLLVERSIONINFO dvi);  
    253.         [DllImport("comctl32.dll")]  
    254.             public static extern IntPtr ImageList_Create(int width, int height, uint flags, int count, int grow);  
    255.         [DllImport("comctl32.dll")]  
    256.             public static extern bool ImageList_Destroy(IntPtr handle);  
    257.         [DllImport("comctl32.dll")]  
    258.             public static extern int ImageList_Add(IntPtr imageHandle, IntPtr hBitmap, IntPtr hMask);  
    259.         [DllImport("comctl32.dll")]  
    260.             public static extern bool ImageList_Remove(IntPtr imageHandle, int index);  
    261.         [DllImport("comctl32.dll")]  
    262.             public static extern bool ImageList_BeginDrag(IntPtr imageHandle, int imageIndex, int xHotSpot, int yHotSpot);  
    263.         [DllImport("comctl32.dll")]  
    264.             public static extern bool ImageList_DragEnter(IntPtr hWndLock, int x, int y);  
    265.         [DllImport("comctl32.dll")]  
    266.             public static extern bool ImageList_DragMove(int x, int y);  
    267.         [DllImport("comctl32.dll")]  
    268.             public static extern bool ImageList_DragLeave(IntPtr hWndLock);  
    269.         [DllImport("comctl32.dll")]  
    270.             public static extern void ImageList_EndDrag();  
    271.         #endregion  
    272.  
    273.         #region Win32 Macro-Like helpers  
    274.         public static int GET_X_LPARAM(int lParam)  
    275.         {  
    276.             return (lParam & 0xffff);  
    277.         }  
    278.        
    279.   
    280.         public static int GET_Y_LPARAM(int lParam)  
    281.         {  
    282.             return (lParam >> 16);  
    283.         }  
    284.   
    285.         public static Point GetPointFromLPARAM(int lParam)  
    286.         {  
    287.             return new Point(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));  
    288.         }  
    289.   
    290.         public static int LOW_ORDER(int param)  
    291.         {  
    292.             return (param & 0xffff);  
    293.         }  
    294.   
    295.         public static int HIGH_ORDER(int param)  
    296.         {  
    297.             return (param >> 16);  
    298.         }  
    299.  
    300.         #endregion  
    301.   
    302.     }  
    303.   
    304. }  

    Enums.cs,

    [csharp] view plain copy
     
    1. using System;  
    2. using System.Runtime.InteropServices;  
    3. using System.Drawing;  
    4. using Lordal.Window.Form.Lib.General;  
    5. using Lordal.Window.Form.Lib.Win32;  
    6.   
    7.   
    8. namespace Lordeo.Framework  
    9. {  
    10.     /// <summary>  
    11.     /// Window API enumerations  
    12.     /// </summary>  
    13.      
    14.     #region Peek Message Flags  
    15.     public enum PeekMessageFlags  
    16.     {  
    17.         PM_NOREMOVE     = 0,  
    18.         PM_REMOVE       = 1,  
    19.         PM_NOYIELD      = 2  
    20.     }  
    21.     #endregion  
    22.      
    23.     #region Windows Messages  
    24.     public enum WinMsg  
    25.     {  
    26.         WM_NULL                   = 0x0000,  
    27.         WM_CREATE                 = 0x0001,  
    28.         WM_DESTROY                = 0x0002,  
    29.         WM_MOVE                   = 0x0003,  
    30.         WM_SIZE                   = 0x0005,  
    31.         WM_ACTIVATE               = 0x0006,  
    32.         WM_SETFOCUS               = 0x0007,  
    33.         WM_KILLFOCUS              = 0x0008,  
    34.         WM_ENABLE                 = 0x000A,  
    35.         WM_SETREDRAW              = 0x000B,  
    36.         WM_SETTEXT                = 0x000C,  
    37.         WM_GETTEXT                = 0x000D,  
    38.         WM_GETTEXTLENGTH          = 0x000E,  
    39.         WM_PAINT                  = 0x000F,  
    40.         WM_CLOSE                  = 0x0010,  
    41.         WM_QUERYENDSESSION        = 0x0011,  
    42.         WM_QUIT                   = 0x0012,  
    43.         WM_QUERYOPEN              = 0x0013,  
    44.         WM_ERASEBKGND             = 0x0014,  
    45.         WM_SYSCOLORCHANGE         = 0x0015,  
    46.         WM_ENDSESSION             = 0x0016,  
    47.         WM_SHOWWINDOW             = 0x0018,  
    48.         WM_CTLCOLOR               = 0x0019,  
    49.         WM_WININICHANGE           = 0x001A,  
    50.         WM_SETTINGCHANGE          = 0x001A,  
    51.         WM_DEVMODECHANGE          = 0x001B,  
    52.         WM_ACTIVATEAPP            = 0x001C,  
    53.         WM_FONTCHANGE             = 0x001D,  
    54.         WM_TIMECHANGE             = 0x001E,  
    55.         WM_CANCELMODE             = 0x001F,  
    56.         WM_SETCURSOR              = 0x0020,  
    57.         WM_MOUSEACTIVATE          = 0x0021,  
    58.         WM_CHILDACTIVATE          = 0x0022,  
    59.         WM_QUEUESYNC              = 0x0023,  
    60.         WM_GETMINMAXINFO          = 0x0024,  
    61.         WM_PAINTICON              = 0x0026,  
    62.         WM_ICONERASEBKGND         = 0x0027,  
    63.         WM_NEXTDLGCTL             = 0x0028,  
    64.         WM_SPOOLERSTATUS          = 0x002A,  
    65.         WM_DRAWITEM               = 0x002B,  
    66.         WM_MEASUREITEM            = 0x002C,  
    67.         WM_DELETEITEM             = 0x002D,  
    68.         WM_VKEYTOITEM             = 0x002E,  
    69.         WM_CHARTOITEM             = 0x002F,  
    70.         WM_SETFONT                = 0x0030,  
    71.         WM_GETFONT                = 0x0031,  
    72.         WM_SETHOTKEY              = 0x0032,  
    73.         WM_GETHOTKEY              = 0x0033,  
    74.         WM_QUERYDRAGICON          = 0x0037,  
    75.         WM_COMPAREITEM            = 0x0039,  
    76.         WM_GETOBJECT              = 0x003D,  
    77.         WM_COMPACTING             = 0x0041,  
    78.         WM_COMMNOTIFY             = 0x0044 ,  
    79.         WM_WINDOWPOSCHANGING      = 0x0046,  
    80.         WM_WINDOWPOSCHANGED       = 0x0047,  
    81.         WM_POWER                  = 0x0048,  
    82.         WM_COPYDATA               = 0x004A,  
    83.         WM_CANCELJOURNAL          = 0x004B,  
    84.         WM_NOTIFY                 = 0x004E,  
    85.         WM_INPUTLANGCHANGEREQUEST = 0x0050,  
    86.         WM_INPUTLANGCHANGE        = 0x0051,  
    87.         WM_TCARD                  = 0x0052,  
    88.         WM_HELP                   = 0x0053,  
    89.         WM_USERCHANGED            = 0x0054,  
    90.         WM_NOTIFYFORMAT           = 0x0055,  
    91.         WM_CONTEXTMENU            = 0x007B,  
    92.         WM_STYLECHANGING          = 0x007C,  
    93.         WM_STYLECHANGED           = 0x007D,  
    94.         WM_DISPLAYCHANGE          = 0x007E,  
    95.         WM_GETICON                = 0x007F,  
    96.         WM_SETICON                = 0x0080,  
    97.         WM_NCCREATE               = 0x0081,  
    98.         WM_NCDESTROY              = 0x0082,  
    99.         WM_NCCALCSIZE             = 0x0083,  
    100.         WM_NCHITTEST              = 0x0084,  
    101.         WM_NCPAINT                = 0x0085,  
    102.         WM_NCACTIVATE             = 0x0086,  
    103.         WM_GETDLGCODE             = 0x0087,  
    104.         WM_SYNCPAINT              = 0x0088,  
    105.         WM_NCMOUSEMOVE            = 0x00A0,  
    106.         WM_NCLBUTTONDOWN          = 0x00A1,  
    107.         WM_NCLBUTTONUP            = 0x00A2,  
    108.         WM_NCLBUTTONDBLCLK        = 0x00A3,  
    109.         WM_NCRBUTTONDOWN          = 0x00A4,  
    110.         WM_NCRBUTTONUP            = 0x00A5,  
    111.         WM_NCRBUTTONDBLCLK        = 0x00A6,  
    112.         WM_NCMBUTTONDOWN          = 0x00A7,  
    113.         WM_NCMBUTTONUP            = 0x00A8,  
    114.         WM_NCMBUTTONDBLCLK        = 0x00A9,  
    115.         WM_KEYDOWN                = 0x0100,  
    116.         WM_KEYUP                  = 0x0101,  
    117.         WM_CHAR                   = 0x0102,  
    118.         WM_DEADCHAR               = 0x0103,  
    119.         WM_SYSKEYDOWN             = 0x0104,  
    120.         WM_SYSKEYUP               = 0x0105,  
    121.         WM_SYSCHAR                = 0x0106,  
    122.         WM_SYSDEADCHAR            = 0x0107,  
    123.         WM_KEYLAST                = 0x0108,  
    124.         WM_IME_STARTCOMPOSITION   = 0x010D,  
    125.         WM_IME_ENDCOMPOSITION     = 0x010E,  
    126.         WM_IME_COMPOSITION        = 0x010F,  
    127.         WM_IME_KEYLAST            = 0x010F,  
    128.         WM_INITDIALOG             = 0x0110,  
    129.         WM_COMMAND                = 0x0111,  
    130.         WM_SYSCOMMAND             = 0x0112,  
    131.         WM_TIMER                  = 0x0113,  
    132.         WM_HSCROLL                = 0x0114,  
    133.         WM_VSCROLL                = 0x0115,  
    134.         WM_INITMENU               = 0x0116,  
    135.         WM_INITMENUPOPUP          = 0x0117,  
    136.         WM_MENUSELECT             = 0x011F,  
    137.         WM_MENUCHAR               = 0x0120,  
    138.         WM_ENTERIDLE              = 0x0121,  
    139.         WM_MENURBUTTONUP          = 0x0122,  
    140.         WM_MENUDRAG               = 0x0123,  
    141.         WM_MENUGETOBJECT          = 0x0124,  
    142.         WM_UNINITMENUPOPUP        = 0x0125,  
    143.         WM_MENUCOMMAND            = 0x0126,  
    144.         WM_CTLCOLORWinMsgBOX      = 0x0132,  
    145.         WM_CTLCOLOREDIT           = 0x0133,  
    146.         WM_CTLCOLORLISTBOX        = 0x0134,  
    147.         WM_CTLCOLORBTN            = 0x0135,  
    148.         WM_CTLCOLORDLG            = 0x0136,  
    149.         WM_CTLCOLORSCROLLBAR      = 0x0137,  
    150.         WM_CTLCOLORSTATIC         = 0x0138,  
    151.         WM_MOUSEMOVE              = 0x0200,  
    152.         WM_LBUTTONDOWN            = 0x0201,  
    153.         WM_LBUTTONUP              = 0x0202,  
    154.         WM_LBUTTONDBLCLK          = 0x0203,  
    155.         WM_RBUTTONDOWN            = 0x0204,  
    156.         WM_RBUTTONUP              = 0x0205,  
    157.         WM_RBUTTONDBLCLK          = 0x0206,  
    158.         WM_MBUTTONDOWN            = 0x0207,  
    159.         WM_MBUTTONUP              = 0x0208,  
    160.         WM_MBUTTONDBLCLK          = 0x0209,  
    161.         WM_MOUSEWHEEL             = 0x020A,  
    162.         WM_PARENTNOTIFY           = 0x0210,  
    163.         WM_ENTERMENULOOP          = 0x0211,  
    164.         WM_EXITMENULOOP           = 0x0212,  
    165.         WM_NEXTMENU               = 0x0213,  
    166.         WM_SIZING                 = 0x0214,  
    167.         WM_CAPTURECHANGED         = 0x0215,  
    168.         WM_MOVING                 = 0x0216,  
    169.         WM_DEVICECHANGE           = 0x0219,  
    170.         WM_MDICREATE              = 0x0220,  
    171.         WM_MDIDESTROY             = 0x0221,  
    172.         WM_MDIACTIVATE            = 0x0222,  
    173.         WM_MDIRESTORE             = 0x0223,  
    174.         WM_MDINEXT                = 0x0224,  
    175.         WM_MDIMAXIMIZE            = 0x0225,  
    176.         WM_MDITILE                = 0x0226,  
    177.         WM_MDICASCADE             = 0x0227,  
    178.         WM_MDIICONARRANGE         = 0x0228,  
    179.         WM_MDIGETACTIVE           = 0x0229,  
    180.         WM_MDISETMENU             = 0x0230,  
    181.         WM_ENTERSIZEMOVE          = 0x0231,  
    182.         WM_EXITSIZEMOVE           = 0x0232,  
    183.         WM_DROPFILES              = 0x0233,  
    184.         WM_MDIREFRESHMENU         = 0x0234,  
    185.         WM_IME_SETCONTEXT         = 0x0281,  
    186.         WM_IME_NOTIFY             = 0x0282,  
    187.         WM_IME_CONTROL            = 0x0283,  
    188.         WM_IME_COMPOSITIONFULL    = 0x0284,  
    189.         WM_IME_SELECT             = 0x0285,  
    190.         WM_IME_CHAR               = 0x0286,  
    191.         WM_IME_REQUEST            = 0x0288,  
    192.         WM_IME_KEYDOWN            = 0x0290,  
    193.         WM_IME_KEYUP              = 0x0291,  
    194.         WM_MOUSEHOVER             = 0x02A1,  
    195.         WM_MOUSELEAVE             = 0x02A3,  
    196.         WM_CUT                    = 0x0300,  
    197.         WM_COPY                   = 0x0301,  
    198.         WM_PASTE                  = 0x0302,  
    199.         WM_CLEAR                  = 0x0303,  
    200.         WM_UNDO                   = 0x0304,  
    201.         WM_RENDERFORMAT           = 0x0305,  
    202.         WM_RENDERALLFORMATS       = 0x0306,  
    203.         WM_DESTROYCLIPBOARD       = 0x0307,  
    204.         WM_DRAWCLIPBOARD          = 0x0308,  
    205.         WM_PAINTCLIPBOARD         = 0x0309,  
    206.         WM_VSCROLLCLIPBOARD       = 0x030A,  
    207.         WM_SIZECLIPBOARD          = 0x030B,  
    208.         WM_ASKCBFORMATNAME        = 0x030C,  
    209.         WM_CHANGECBCHAIN          = 0x030D,  
    210.         WM_HSCROLLCLIPBOARD       = 0x030E,  
    211.         WM_QUERYNEWPALETTE        = 0x030F,  
    212.         WM_PALETTEISCHANGING      = 0x0310,  
    213.         WM_PALETTECHANGED         = 0x0311,  
    214.         WM_HOTKEY                 = 0x0312,  
    215.         WM_PRINT                  = 0x0317,  
    216.         WM_PRINTCLIENT            = 0x0318,  
    217.         WM_HANDHELDFIRST          = 0x0358,  
    218.         WM_HANDHELDLAST           = 0x035F,  
    219.         WM_AFXFIRST               = 0x0360,  
    220.         WM_AFXLAST                = 0x037F,  
    221.         WM_PENWINFIRST            = 0x0380,  
    222.         WM_PENWINLAST             = 0x038F,  
    223.         WM_APP                    = 0x8000,  
    224.         WM_USER                   = 0x0400,  
    225.         WM_REFLECT                = WM_USER + 0x1c00  
    226.     }  
    227.     #endregion  
    228.  
    229.     #region Window Styles  
    230.     public enum WindowStyles : uint  
    231.     {  
    232.         WS_OVERLAPPED       = 0x00000000,  
    233.         WS_POPUP            = 0x80000000,  
    234.         WS_CHILD            = 0x40000000,  
    235.         WS_MINIMIZE         = 0x20000000,  
    236.         WS_VISIBLE          = 0x10000000,  
    237.         WS_DISABLED         = 0x08000000,  
    238.         WS_CLIPSIBLINGS     = 0x04000000,  
    239.         WS_CLIPCHILDREN     = 0x02000000,  
    240.         WS_MAXIMIZE         = 0x01000000,  
    241.         WS_CAPTION          = 0x00C00000,  
    242.         WS_BORDER           = 0x00800000,  
    243.         WS_DLGFRAME         = 0x00400000,  
    244.         WS_VSCROLL          = 0x00200000,  
    245.         WS_HSCROLL          = 0x00100000,  
    246.         WS_SYSMENU          = 0x00080000,  
    247.         WS_THICKFRAME       = 0x00040000,  
    248.         WS_GROUP            = 0x00020000,  
    249.         WS_TABSTOP          = 0x00010000,  
    250.         WS_MINIMIZEBOX      = 0x00020000,  
    251.         WS_MAXIMIZEBOX      = 0x00010000,  
    252.         WS_TILED            = 0x00000000,  
    253.         WS_ICONIC           = 0x20000000,  
    254.         WS_SIZEBOX          = 0x00040000,  
    255.         WS_POPUPWINDOW      = 0x80880000,  
    256.         WS_OVERLAPPEDWINDOW = 0x00CF0000,  
    257.         WS_TILEDWINDOW      = 0x00CF0000,  
    258.         WS_CHILDWINDOW      = 0x40000000  
    259.     }  
    260.     #endregion  
    261.  
    262.     #region Window Extended Styles  
    263.     public enum WindowExStyles  
    264.     {  
    265.         WS_EX_DLGMODALFRAME     = 0x00000001,  
    266.         WS_EX_NOPARENTNOTIFY    = 0x00000004,  
    267.         WS_EX_TOPMOST           = 0x00000008,  
    268.         WS_EX_ACCEPTFILES       = 0x00000010,  
    269.         WS_EX_TRANSPARENT       = 0x00000020,  
    270.         WS_EX_MDICHILD          = 0x00000040,  
    271.         WS_EX_TOOLWINDOW        = 0x00000080,  
    272.         WS_EX_WINDOWEDGE        = 0x00000100,  
    273.         WS_EX_CLIENTEDGE        = 0x00000200,  
    274.         WS_EX_CONTEXTHELP       = 0x00000400,  
    275.         WS_EX_RIGHT             = 0x00001000,  
    276.         WS_EX_LEFT              = 0x00000000,  
    277.         WS_EX_RTLREADING        = 0x00002000,  
    278.         WS_EX_LTRREADING        = 0x00000000,  
    279.         WS_EX_LEFTSCROLLBAR     = 0x00004000,  
    280.         WS_EX_RIGHTSCROLLBAR    = 0x00000000,  
    281.         WS_EX_CONTROLPARENT     = 0x00010000,  
    282.         WS_EX_STATICEDGE        = 0x00020000,  
    283.         WS_EX_APPWINDOW         = 0x00040000,  
    284.         WS_EX_OVERLAPPEDWINDOW  = 0x00000300,  
    285.         WS_EX_PALETTEWINDOW     = 0x00000188,  
    286.         WS_EX_LAYERED           = 0x00080000  
    287.     }  
    288.     #endregion  
    289.  
    290.     #region ShowWindow Styles  
    291.     public enum ShowWindowStyles : short  
    292.     {  
    293.         SW_HIDE             = 0,  
    294.         SW_SHOWNORMAL       = 1,  
    295.         SW_NORMAL           = 1,  
    296.         SW_SHOWMINIMIZED    = 2,  
    297.         SW_SHOWMAXIMIZED    = 3,  
    298.         SW_MAXIMIZE         = 3,  
    299.         SW_SHOWNOACTIVATE   = 4,  
    300.         SW_SHOW             = 5,  
    301.         SW_MINIMIZE         = 6,  
    302.         SW_SHOWMINNOACTIVE  = 7,  
    303.         SW_SHOWNA           = 8,  
    304.         SW_RESTORE          = 9,  
    305.         SW_SHOWDEFAULT      = 10,  
    306.         SW_FORCEMINIMIZE    = 11,  
    307.         SW_MAX              = 11  
    308.     }  
    309.  
    310.     #endregion  
    311.  
    312.     #region SetWindowPos Z Order  
    313.     public enum SetWindowPosZOrder  
    314.     {  
    315.         HWND_TOP        = 0,  
    316.         HWND_BOTTOM     = 1,  
    317.         HWND_TOPMOST    = -1,  
    318.         HWND_NOTOPMOST  = -2  
    319.     }  
    320.     #endregion  
    321.  
    322.     #region SetWindowPosFlags  
    323.     public enum SetWindowPosFlags : uint  
    324.     {  
    325.         SWP_NOSIZE          = 0x0001,  
    326.         SWP_NOMOVE          = 0x0002,  
    327.         SWP_NOZORDER        = 0x0004,  
    328.         SWP_NOREDRAW        = 0x0008,  
    329.         SWP_NOACTIVATE      = 0x0010,  
    330.         SWP_FRAMECHANGED    = 0x0020,  
    331.         SWP_SHOWWINDOW      = 0x0040,  
    332.         SWP_HIDEWINDOW      = 0x0080,  
    333.         SWP_NOCOPYBITS      = 0x0100,  
    334.         SWP_NOOWNERZORDER   = 0x0200,   
    335.         SWP_NOSENDCHANGING  = 0x0400,  
    336.         SWP_DRAWFRAME       = 0x0020,  
    337.         SWP_NOREPOSITION    = 0x0200,  
    338.         SWP_DEFERERASE      = 0x2000,  
    339.         SWP_ASYNCWINDOWPOS  = 0x4000  
    340.     }  
    341.     #endregion  
    342.  
    343.     #region Virtual Keys  
    344.     public enum VirtualKeys  
    345.     {  
    346.         VK_LBUTTON      = 0x01,  
    347.         VK_CANCEL       = 0x03,  
    348.         VK_BACK         = 0x08,  
    349.         VK_TAB          = 0x09,  
    350.         VK_CLEAR        = 0x0C,  
    351.         VK_RETURN       = 0x0D,  
    352.         VK_SHIFT        = 0x10,  
    353.         VK_CONTROL      = 0x11,  
    354.         VK_MENU         = 0x12,  
    355.         VK_CAPITAL      = 0x14,  
    356.         VK_ESCAPE       = 0x1B,  
    357.         VK_SPACE        = 0x20,  
    358.         VK_PRIOR        = 0x21,  
    359.         VK_NEXT         = 0x22,  
    360.         VK_END          = 0x23,  
    361.         VK_HOME         = 0x24,  
    362.         VK_LEFT         = 0x25,  
    363.         VK_UP           = 0x26,  
    364.         VK_RIGHT        = 0x27,  
    365.         VK_DOWN         = 0x28,  
    366.         VK_SELECT       = 0x29,  
    367.         VK_EXECUTE      = 0x2B,  
    368.         VK_SNAPSHOT     = 0x2C,  
    369.         VK_HELP         = 0x2F,  
    370.         VK_0            = 0x30,  
    371.         VK_1            = 0x31,  
    372.         VK_2            = 0x32,  
    373.         VK_3            = 0x33,  
    374.         VK_4            = 0x34,  
    375.         VK_5            = 0x35,  
    376.         VK_6            = 0x36,  
    377.         VK_7            = 0x37,  
    378.         VK_8            = 0x38,  
    379.         VK_9            = 0x39,  
    380.         VK_A            = 0x41,  
    381.         VK_B            = 0x42,  
    382.         VK_C            = 0x43,  
    383.         VK_D            = 0x44,  
    384.         VK_E            = 0x45,  
    385.         VK_F            = 0x46,  
    386.         VK_G            = 0x47,  
    387.         VK_H            = 0x48,  
    388.         VK_I            = 0x49,  
    389.         VK_J            = 0x4A,  
    390.         VK_K            = 0x4B,  
    391.         VK_L            = 0x4C,  
    392.         VK_M            = 0x4D,  
    393.         VK_N            = 0x4E,  
    394.         VK_O            = 0x4F,  
    395.         VK_P            = 0x50,  
    396.         VK_Q            = 0x51,  
    397.         VK_R            = 0x52,  
    398.         VK_S            = 0x53,  
    399.         VK_T            = 0x54,  
    400.         VK_U            = 0x55,  
    401.         VK_V            = 0x56,  
    402.         VK_W            = 0x57,  
    403.         VK_X            = 0x58,  
    404.         VK_Y            = 0x59,  
    405.         VK_Z            = 0x5A,  
    406.         VK_NUMPAD0      = 0x60,  
    407.         VK_NUMPAD1      = 0x61,  
    408.         VK_NUMPAD2      = 0x62,  
    409.         VK_NUMPAD3      = 0x63,  
    410.         VK_NUMPAD4      = 0x64,  
    411.         VK_NUMPAD5      = 0x65,  
    412.         VK_NUMPAD6      = 0x66,  
    413.         VK_NUMPAD7      = 0x67,  
    414.         VK_NUMPAD8      = 0x68,  
    415.         VK_NUMPAD9      = 0x69,  
    416.         VK_MULTIPLY     = 0x6A,  
    417.         VK_ADD          = 0x6B,  
    418.         VK_SEPARATOR    = 0x6C,  
    419.         VK_SUBTRACT     = 0x6D,  
    420.         VK_DECIMAL      = 0x6E,  
    421.         VK_DIVIDE       = 0x6F,  
    422.         VK_ATTN         = 0xF6,  
    423.         VK_CRSEL        = 0xF7,  
    424.         VK_EXSEL        = 0xF8,  
    425.         VK_EREOF        = 0xF9,  
    426.         VK_PLAY         = 0xFA,    
    427.         VK_ZOOM         = 0xFB,  
    428.         VK_NONAME       = 0xFC,  
    429.         VK_PA1          = 0xFD,  
    430.         VK_OEM_CLEAR    = 0xFE,  
    431.         VK_LWIN         = 0x5B,  
    432.         VK_RWIN         = 0x5C,  
    433.         VK_APPS         = 0x5D,     
    434.         VK_LSHIFT       = 0xA0,     
    435.         VK_RSHIFT       = 0xA1,     
    436.         VK_LCONTROL     = 0xA2,     
    437.         VK_RCONTROL     = 0xA3,     
    438.         VK_LMENU        = 0xA4,     
    439.         VK_RMENU        = 0xA5  
    440.     }  
    441.     #endregion  
    442.          
    443.     #region PatBlt Types  
    444.     public enum PatBltTypes  
    445.     {  
    446.         SRCCOPY          =   0x00CC0020,  
    447.         SRCPAINT         =   0x00EE0086,  
    448.         SRCAND           =   0x008800C6,  
    449.         SRCINVERT        =   0x00660046,  
    450.         SRCERASE         =   0x00440328,  
    451.         NOTSRCCOPY       =   0x00330008,  
    452.         NOTSRCERASE      =   0x001100A6,  
    453.         MERGECOPY        =   0x00C000CA,  
    454.         MERGEPAINT       =   0x00BB0226,  
    455.         PATCOPY          =   0x00F00021,  
    456.         PATPAINT         =   0x00FB0A09,  
    457.         PATINVERT        =   0x005A0049,  
    458.         DSTINVERT        =   0x00550009,  
    459.         BLACKNESS        =   0x00000042,  
    460.         WHITENESS        =   0x00FF0062  
    461.     }  
    462.     #endregion  
    463.      
    464.     #region Clipboard Formats  
    465.     public enum ClipboardFormats : uint  
    466.     {             
    467.         CF_TEXT             = 1,  
    468.         CF_BITMAP           = 2,  
    469.         CF_METAFILEPICT     = 3,  
    470.         CF_SYLK             = 4,  
    471.         CF_DIF              = 5,  
    472.         CF_TIFF             = 6,  
    473.         CF_OEMTEXT          = 7,  
    474.         CF_DIB              = 8,  
    475.         CF_PALETTE          = 9,  
    476.         CF_PENDATA          = 10,  
    477.         CF_RIFF             = 11,  
    478.         CF_WAVE             = 12,  
    479.         CF_UNICODETEXT      = 13,  
    480.         CF_ENHMETAFILE      = 14,  
    481.         CF_HDROP            = 15,  
    482.         CF_LOCALE           = 16,  
    483.         CF_MAX              = 17,  
    484.         CF_OWNERDISPLAY     = 0x0080,  
    485.         CF_DSPTEXT          = 0x0081,  
    486.         CF_DSPBITMAP        = 0x0082,  
    487.         CF_DSPMETAFILEPICT  = 0x0083,  
    488.         CF_DSPENHMETAFILE   = 0x008E,  
    489.         CF_PRIVATEFIRST     = 0x0200,  
    490.         CF_PRIVATELAST      = 0x02FF,  
    491.         CF_GDIOBJFIRST      = 0x0300,  
    492.         CF_GDIOBJLAST       = 0x03FF  
    493.     }  
    494.     #endregion  
    495.  
    496.     #region Common Controls Initialization flags  
    497.     public enum CommonControlInitFlags  
    498.     {  
    499.         ICC_LISTVIEW_CLASSES   = 0x00000001,   
    500.         ICC_TREEVIEW_CLASSES   = 0x00000002,   
    501.         ICC_BAR_CLASSES        = 0x00000004,   
    502.         ICC_TAB_CLASSES        = 0x00000008,   
    503.         ICC_UPDOWN_CLASS       = 0x00000010,   
    504.         ICC_PROGRESS_CLASS     = 0x00000020,   
    505.         ICC_HOTKEY_CLASS       = 0x00000040,   
    506.         ICC_ANIMATE_CLASS      = 0x00000080,   
    507.         ICC_WIN95_CLASSES      = 0x000000FF,  
    508.         ICC_DATE_CLASSES       = 0x00000100,   
    509.         ICC_USEREX_CLASSES     = 0x00000200,  
    510.         ICC_COOL_CLASSES       = 0x00000400,   
    511.         ICC_INTERNET_CLASSES   = 0x00000800,  
    512.         ICC_PAGESCROLLER_CLASS = 0x00001000,   
    513.         ICC_NATIVEFNTCTL_CLASS = 0x00002000    
    514.     }  
    515.     #endregion  
    516.  
    517.     #region Common Controls Styles  
    518.     public  enum CommonControlStyles  
    519.     {  
    520.         CCS_TOP                 = 0x00000001,  
    521.         CCS_NOMOVEY             = 0x00000002,  
    522.         CCS_BOTTOM              = 0x00000003,  
    523.         CCS_NORESIZE            = 0x00000004,  
    524.         CCS_NOPARENTALIGN       = 0x00000008,  
    525.         CCS_ADJUSTABLE          = 0x00000020,  
    526.         CCS_NODIVIDER           = 0x00000040,  
    527.         CCS_VERT                = 0x00000080,  
    528.         CCS_LEFT                = (CCS_VERT | CCS_TOP),  
    529.         CCS_RIGHT               = (CCS_VERT | CCS_BOTTOM),  
    530.         CCS_NOMOVEX             = (CCS_VERT | CCS_NOMOVEY)  
    531.     }  
    532.     #endregion  
    533.  
    534.     #region ToolBar Styles  
    535.     public enum ToolBarStyles  
    536.     {  
    537.         TBSTYLE_BUTTON          = 0x0000,  
    538.         TBSTYLE_SEP             = 0x0001,  
    539.         TBSTYLE_CHECK           = 0x0002,  
    540.         TBSTYLE_GROUP           = 0x0004,  
    541.         TBSTYLE_CHECKGROUP      = (TBSTYLE_GROUP | TBSTYLE_CHECK),  
    542.         TBSTYLE_DROPDOWN        = 0x0008,  
    543.         TBSTYLE_AUTOSIZE        = 0x0010,  
    544.         TBSTYLE_NOPREFIX        = 0x0020,   
    545.         TBSTYLE_TOOLTIPS        = 0x0100,  
    546.         TBSTYLE_WRAPABLE        = 0x0200,  
    547.         TBSTYLE_ALTDRAG         = 0x0400,  
    548.         TBSTYLE_FLAT            = 0x0800,  
    549.         TBSTYLE_LIST            = 0x1000,  
    550.         TBSTYLE_CUSTOMERASE     = 0x2000,  
    551.         TBSTYLE_REGISTERDROP    = 0x4000,  
    552.         TBSTYLE_TRANSPARENT     = 0x8000,  
    553.         TBSTYLE_EX_DRAWDDARROWS = 0x00000001  
    554.     }  
    555.     #endregion  
    556.  
    557.     #region ToolBar Ex Styles  
    558.     public enum ToolBarExStyles  
    559.     {  
    560.         TBSTYLE_EX_DRAWDDARROWS         = 0x1,  
    561.         TBSTYLE_EX_HIDECLIPPEDBUTTONS   = 0x10,  
    562.         TBSTYLE_EX_DOUBLEBUFFER         = 0x80  
    563.     }  
    564.     #endregion  
    565.  
    566.     #region ToolBar Messages  
    567.     public enum ToolBarMessages  
    568.     {  
    569.         WM_USER                 =  0x0400,  
    570.         TB_ENABLEBUTTON         = (WM_USER + 1),  
    571.         TB_CHECKBUTTON          = (WM_USER + 2),  
    572.         TB_PRESSBUTTON          = (WM_USER + 3),  
    573.         TB_HIDEBUTTON           = (WM_USER + 4),  
    574.         TB_INDETERMINATE        = (WM_USER + 5),  
    575.         TB_MARKBUTTON           = (WM_USER + 6),  
    576.         TB_ISBUTTONENABLED      = (WM_USER + 9),  
    577.         TB_ISBUTTONCHECKED      = (WM_USER + 10),  
    578.         TB_ISBUTTONPRESSED      = (WM_USER + 11),  
    579.         TB_ISBUTTONHIDDEN       = (WM_USER + 12),  
    580.         TB_ISBUTTONINDETERMINATE= (WM_USER + 13),  
    581.         TB_ISBUTTONHIGHLIGHTED  = (WM_USER + 14),  
    582.         TB_SETSTATE             = (WM_USER + 17),  
    583.         TB_GETSTATE             = (WM_USER + 18),  
    584.         TB_ADDBITMAP            = (WM_USER + 19),  
    585.         TB_ADDBUTTONSA          = (WM_USER + 20),  
    586.         TB_INSERTBUTTONA        = (WM_USER + 21),  
    587.         TB_ADDBUTTONS           = (WM_USER + 20),  
    588.         TB_INSERTBUTTON         = (WM_USER + 21),  
    589.         TB_DELETEBUTTON         = (WM_USER + 22),  
    590.         TB_GETBUTTON            = (WM_USER + 23),  
    591.         TB_BUTTONCOUNT          = (WM_USER + 24),  
    592.         TB_COMMANDTOINDEX       = (WM_USER + 25),  
    593.         TB_SAVERESTOREA         = (WM_USER + 26),  
    594.         TB_CUSTOMIZE            = (WM_USER + 27),  
    595.         TB_ADDSTRINGA           = (WM_USER + 28),  
    596.         TB_GETITEMRECT          = (WM_USER + 29),  
    597.         TB_BUTTONSTRUCTSIZE     = (WM_USER + 30),  
    598.         TB_SETBUTTONSIZE        = (WM_USER + 31),  
    599.         TB_SETBITMAPSIZE        = (WM_USER + 32),  
    600.         TB_AUTOSIZE             = (WM_USER + 33),  
    601.         TB_GETTOOLTIPS          = (WM_USER + 35),  
    602.         TB_SETTOOLTIPS          = (WM_USER + 36),  
    603.         TB_SETPARENT            = (WM_USER + 37),  
    604.         TB_SETROWS              = (WM_USER + 39),  
    605.         TB_GETROWS              = (WM_USER + 40),  
    606.         TB_GETBITMAPFLAGS       = (WM_USER + 41),  
    607.         TB_SETCMDID             = (WM_USER + 42),  
    608.         TB_CHANGEBITMAP         = (WM_USER + 43),  
    609.         TB_GETBITMAP            = (WM_USER + 44),  
    610.         TB_GETBUTTONTEXTA       = (WM_USER + 45),  
    611.         TB_GETBUTTONTEXTW       = (WM_USER + 75),  
    612.         TB_REPLACEBITMAP        = (WM_USER + 46),  
    613.         TB_SETINDENT            = (WM_USER + 47),  
    614.         TB_SETIMAGELIST         = (WM_USER + 48),  
    615.         TB_GETIMAGELIST         = (WM_USER + 49),  
    616.         TB_LOADIMAGES           = (WM_USER + 50),  
    617.         TB_GETRECT              = (WM_USER + 51),  
    618.         TB_SETHOTIMAGELIST      = (WM_USER + 52),  
    619.         TB_GETHOTIMAGELIST      = (WM_USER + 53),  
    620.         TB_SETDISABLEDIMAGELIST = (WM_USER + 54),  
    621.         TB_GETDISABLEDIMAGELIST = (WM_USER + 55),  
    622.         TB_SETSTYLE             = (WM_USER + 56),  
    623.         TB_GETSTYLE             = (WM_USER + 57),  
    624.         TB_GETBUTTONSIZE        = (WM_USER + 58),  
    625.         TB_SETBUTTONWIDTH       = (WM_USER + 59),  
    626.         TB_SETMAXTEXTROWS       = (WM_USER + 60),  
    627.         TB_GETTEXTROWS          = (WM_USER + 61),  
    628.         TB_GETOBJECT            = (WM_USER + 62),   
    629.         TB_GETBUTTONINFOW       = (WM_USER + 63),  
    630.         TB_SETBUTTONINFOW       = (WM_USER + 64),  
    631.         TB_GETBUTTONINFOA       = (WM_USER + 65),  
    632.         TB_SETBUTTONINFOA       = (WM_USER + 66),  
    633.         TB_INSERTBUTTONW        = (WM_USER + 67),  
    634.         TB_ADDBUTTONSW          = (WM_USER + 68),  
    635.         TB_HITTEST              = (WM_USER + 69),  
    636.         TB_SETDRAWTEXTFLAGS     = (WM_USER + 70),  
    637.         TB_GETHOTITEM           = (WM_USER + 71),  
    638.         TB_SETHOTITEM           = (WM_USER + 72),   
    639.         TB_SETANCHORHIGHLIGHT   = (WM_USER + 73),    
    640.         TB_GETANCHORHIGHLIGHT   = (WM_USER + 74),  
    641.         TB_SAVERESTOREW         = (WM_USER + 76),  
    642.         TB_ADDSTRINGW           = (WM_USER + 77),  
    643.         TB_MAPACCELERATORA      = (WM_USER + 78),   
    644.         TB_GETINSERTMARK        = (WM_USER + 79),   
    645.         TB_SETINSERTMARK        = (WM_USER + 80),   
    646.         TB_INSERTMARKHITTEST    = (WM_USER + 81),    
    647.         TB_MOVEBUTTON           = (WM_USER + 82),  
    648.         TB_GETMAXSIZE           = (WM_USER + 83),    
    649.         TB_SETEXTENDEDSTYLE     = (WM_USER + 84),    
    650.         TB_GETEXTENDEDSTYLE     = (WM_USER + 85),    
    651.         TB_GETPADDING           = (WM_USER + 86),  
    652.         TB_SETPADDING           = (WM_USER + 87),  
    653.         TB_SETINSERTMARKCOLOR   = (WM_USER + 88),  
    654.         TB_GETINSERTMARKCOLOR   = (WM_USER + 89)  
    655.     }  
    656.     #endregion  
    657.  
    658.     #region ToolBar Notifications  
    659.     public enum ToolBarNotifications  
    660.     {  
    661.         TTN_NEEDTEXTA       = ((0-520)-0),  
    662.         TTN_NEEDTEXTW       = ((0-520)-10),  
    663.         TBN_QUERYINSERT     = ((0-700)-6),  
    664.         TBN_DROPDOWN        = ((0-700)-10),  
    665.         TBN_HOTITEMCHANGE   = ((0 - 700) - 13)  
    666.     }  
    667.     #endregion  
    668.  
    669.     #region Reflected Messages  
    670.     public enum ReflectedMessages  
    671.     {  
    672.         OCM__BASE               = (WinMsg.WM_USER+0x1c00),  
    673.         OCM_COMMAND             = (OCM__BASE + WinMsg.WM_COMMAND),  
    674.         OCM_CTLCOLORBTN         = (OCM__BASE + WinMsg.WM_CTLCOLORBTN),  
    675.         OCM_CTLCOLOREDIT        = (OCM__BASE + WinMsg.WM_CTLCOLOREDIT),  
    676.         OCM_CTLCOLORDLG         = (OCM__BASE + WinMsg.WM_CTLCOLORDLG),  
    677.         OCM_CTLCOLORLISTBOX     = (OCM__BASE + WinMsg.WM_CTLCOLORLISTBOX),  
    678.         OCM_CTLCOLORWinMsgBOX       = (OCM__BASE + WinMsg.WM_CTLCOLORWinMsgBOX),  
    679.         OCM_CTLCOLORSCROLLBAR   = (OCM__BASE + WinMsg.WM_CTLCOLORSCROLLBAR),  
    680.         OCM_CTLCOLORSTATIC      = (OCM__BASE + WinMsg.WM_CTLCOLORSTATIC),  
    681.         OCM_CTLCOLOR            = (OCM__BASE + WinMsg.WM_CTLCOLOR),  
    682.         OCM_DRAWITEM            = (OCM__BASE + WinMsg.WM_DRAWITEM),  
    683.         OCM_MEASUREITEM         = (OCM__BASE + WinMsg.WM_MEASUREITEM),  
    684.         OCM_DELETEITEM          = (OCM__BASE + WinMsg.WM_DELETEITEM),  
    685.         OCM_VKEYTOITEM          = (OCM__BASE + WinMsg.WM_VKEYTOITEM),  
    686.         OCM_CHARTOITEM          = (OCM__BASE + WinMsg.WM_CHARTOITEM),  
    687.         OCM_COMPAREITEM         = (OCM__BASE + WinMsg.WM_COMPAREITEM),  
    688.         OCM_HSCROLL             = (OCM__BASE + WinMsg.WM_HSCROLL),  
    689.         OCM_VSCROLL             = (OCM__BASE + WinMsg.WM_VSCROLL),  
    690.         OCM_PARENTNOTIFY        = (OCM__BASE + WinMsg.WM_PARENTNOTIFY),  
    691.         OCM_NOTIFY              = (OCM__BASE + WinMsg.WM_NOTIFY)  
    692.     }  
    693.     #endregion  
    694.  
    695.     #region Notification Messages  
    696.     public enum NotificationMessages  
    697.     {  
    698.         NM_FIRST      = (0-0),  
    699.         NM_CUSTOMDRAW = (NM_FIRST-12),  
    700.         NM_NCHITTEST  = (NM_FIRST-14)   
    701.     }  
    702.     #endregion  
    703.  
    704.     #region ToolTip Flags  
    705.     public enum ToolTipFlags  
    706.     {  
    707.         TTF_CENTERTIP           = 0x0002,  
    708.         TTF_RTLREADING          = 0x0004,  
    709.         TTF_SUBCLASS            = 0x0010,  
    710.         TTF_TRACK               = 0x0020,  
    711.         TTF_ABSOLUTE            = 0x0080,  
    712.         TTF_TRANSPARENT         = 0x0100,  
    713.         TTF_DI_SETITEM          = 0x8000     
    714.     }  
    715.     #endregion  
    716.  
    717.     #region Custom Draw Return Flags  
    718.     public enum CustomDrawReturnFlags  
    719.     {  
    720.         CDRF_DODEFAULT          = 0x00000000,  
    721.         CDRF_NEWFONT            = 0x00000002,  
    722.         CDRF_SKIPDEFAULT        = 0x00000004,  
    723.         CDRF_NOTIFYPOSTPAINT    = 0x00000010,  
    724.         CDRF_NOTIFYITEMDRAW     = 0x00000020,  
    725.         CDRF_NOTIFYSUBITEMDRAW  = 0x00000020,   
    726.         CDRF_NOTIFYPOSTERASE    = 0x00000040  
    727.     }  
    728.     #endregion  
    729.  
    730.     #region Custom Draw Item State Flags  
    731.     public enum CustomDrawItemStateFlags  
    732.     {  
    733.         CDIS_SELECTED       = 0x0001,  
    734.         CDIS_GRAYED         = 0x0002,  
    735.         CDIS_DISABLED       = 0x0004,  
    736.         CDIS_CHECKED        = 0x0008,  
    737.         CDIS_FOCUS          = 0x0010,  
    738.         CDIS_DEFAULT        = 0x0020,  
    739.         CDIS_HOT            = 0x0040,  
    740.         CDIS_MARKED         = 0x0080,  
    741.         CDIS_INDETERMINATE  = 0x0100  
    742.     }  
    743.     #endregion  
    744.  
    745.     #region Custom Draw Draw State Flags  
    746.     public enum CustomDrawDrawStateFlags  
    747.     {  
    748.         CDDS_PREPAINT           = 0x00000001,  
    749.         CDDS_POSTPAINT          = 0x00000002,  
    750.         CDDS_PREERASE           = 0x00000003,  
    751.         CDDS_POSTERASE          = 0x00000004,  
    752.         CDDS_ITEM               = 0x00010000,  
    753.         CDDS_ITEMPREPAINT       = (CDDS_ITEM | CDDS_PREPAINT),  
    754.         CDDS_ITEMPOSTPAINT      = (CDDS_ITEM | CDDS_POSTPAINT),  
    755.         CDDS_ITEMPREERASE       = (CDDS_ITEM | CDDS_PREERASE),  
    756.         CDDS_ITEMPOSTERASE      = (CDDS_ITEM | CDDS_POSTERASE),  
    757.         CDDS_SUBITEM            = 0x00020000  
    758.     }  
    759.     #endregion  
    760.  
    761.     #region Toolbar button info flags  
    762.     public enum ToolBarButtonInfoFlags  
    763.     {  
    764.         TBIF_IMAGE             = 0x00000001,  
    765.         TBIF_TEXT              = 0x00000002,  
    766.         TBIF_STATE             = 0x00000004,  
    767.         TBIF_STYLE             = 0x00000008,  
    768.         TBIF_LPARAM            = 0x00000010,  
    769.         TBIF_COMMAND           = 0x00000020,  
    770.         TBIF_SIZE              = 0x00000040,  
    771.         I_IMAGECALLBACK        = -1,  
    772.         I_IMAGENONE            = -2  
    773.     }  
    774.     #endregion  
    775.  
    776.     #region Toolbar button styles  
    777.     public enum ToolBarButtonStyles  
    778.     {  
    779.         TBSTYLE_BUTTON          = 0x0000,  
    780.         TBSTYLE_SEP             = 0x0001,  
    781.         TBSTYLE_CHECK           = 0x0002,  
    782.         TBSTYLE_GROUP           = 0x0004,  
    783.         TBSTYLE_CHECKGROUP      = (TBSTYLE_GROUP | TBSTYLE_CHECK),  
    784.         TBSTYLE_DROPDOWN        = 0x0008,  
    785.         TBSTYLE_AUTOSIZE        = 0x0010,  
    786.         TBSTYLE_NOPREFIX        = 0x0020,   
    787.         TBSTYLE_TOOLTIPS        = 0x0100,  
    788.         TBSTYLE_WRAPABLE        = 0x0200,  
    789.         TBSTYLE_ALTDRAG         = 0x0400,  
    790.         TBSTYLE_FLAT            = 0x0800,  
    791.         TBSTYLE_LIST            = 0x1000,  
    792.         TBSTYLE_CUSTOMERASE     = 0x2000,  
    793.         TBSTYLE_REGISTERDROP    = 0x4000,  
    794.         TBSTYLE_TRANSPARENT     = 0x8000,  
    795.         TBSTYLE_EX_DRAWDDARROWS = 0x00000001  
    796.     }  
    797.     #endregion  
    798.  
    799.     #region Toolbar button state  
    800.     public enum ToolBarButtonStates  
    801.     {  
    802.         TBSTATE_CHECKED         = 0x01,  
    803.         TBSTATE_PRESSED         = 0x02,  
    804.         TBSTATE_ENABLED         = 0x04,  
    805.         TBSTATE_HIDDEN          = 0x08,  
    806.         TBSTATE_INDETERMINATE   = 0x10,  
    807.         TBSTATE_WRAP            = 0x20,  
    808.         TBSTATE_ELLIPSES        = 0x40,  
    809.         TBSTATE_MARKED          = 0x80  
    810.     }  
    811.     #endregion  
    812.  
    813.     #region Windows Hook Codes  
    814.     public enum WindowsHookCodes  
    815.     {  
    816.         WH_MSGFILTER        = (-1),  
    817.         WH_JOURNALRECORD    = 0,  
    818.         WH_JOURNALPLAYBACK  = 1,  
    819.         WH_KEYBOARD         = 2,  
    820.         WH_GETMESSAGE       = 3,  
    821.         WH_CALLWNDPROC      = 4,  
    822.         WH_CBT              = 5,  
    823.         WH_SYSMSGFILTER     = 6,  
    824.         WH_MOUSE            = 7,  
    825.         WH_HARDWARE         = 8,  
    826.         WH_DEBUG            = 9,  
    827.         WH_SHELL            = 10,  
    828.         WH_FOREGROUNDIDLE   = 11,  
    829.         WH_CALLWNDPROCRET   = 12,  
    830.         WH_KEYBOARD_LL      = 13,  
    831.         WH_MOUSE_LL         = 14  
    832.     }  
    833.            
    834.     #endregion  
    835.  
    836.     #region Mouse Hook Filters  
    837.     public enum MouseHookFilters  
    838.     {  
    839.         MSGF_DIALOGBOX      = 0,  
    840.         MSGF_MESSAGEBOX     = 1,  
    841.         MSGF_MENU           = 2,  
    842.         MSGF_SCROLLBAR      = 5,  
    843.         MSGF_NEXTWINDOW     = 6  
    844.     }  
    845.  
    846.     #endregion  
    847.  
    848.     #region Draw Text format flags  
    849.     public enum DrawTextFormatFlags  
    850.     {  
    851.         DT_TOP              = 0x00000000,  
    852.         DT_LEFT             = 0x00000000,  
    853.         DT_CENTER           = 0x00000001,  
    854.         DT_RIGHT            = 0x00000002,  
    855.         DT_VCENTER          = 0x00000004,  
    856.         DT_BOTTOM           = 0x00000008,  
    857.         DT_WORDBREAK        = 0x00000010,  
    858.         DT_SINGLELINE       = 0x00000020,  
    859.         DT_EXPANDTABS       = 0x00000040,  
    860.         DT_TABSTOP          = 0x00000080,  
    861.         DT_NOCLIP           = 0x00000100,  
    862.         DT_EXTERNALLEADING  = 0x00000200,  
    863.         DT_CALCRECT         = 0x00000400,  
    864.         DT_NOPREFIX         = 0x00000800,  
    865.         DT_INTERNAL         = 0x00001000,  
    866.         DT_EDITCONTROL      = 0x00002000,  
    867.         DT_PATH_ELLIPSIS    = 0x00004000,  
    868.         DT_END_ELLIPSIS     = 0x00008000,  
    869.         DT_MODIFYSTRING     = 0x00010000,  
    870.         DT_RTLREADING       = 0x00020000,  
    871.         DT_WORD_ELLIPSIS    = 0x00040000  
    872.     }  
    873.  
    874.     #endregion  
    875.  
    876.     #region Rebar Styles  
    877.     public enum RebarStyles  
    878.     {  
    879.         RBS_TOOLTIPS        = 0x0100,  
    880.         RBS_VARHEIGHT       = 0x0200,  
    881.         RBS_BANDBORDERS     = 0x0400,  
    882.         RBS_FIXEDORDER      = 0x0800,  
    883.         RBS_REGISTERDROP    = 0x1000,  
    884.         RBS_AUTOSIZE        = 0x2000,  
    885.         RBS_VERTICALGRIPPER = 0x4000,   
    886.         RBS_DBLCLKTOGGLE    = 0x8000,  
    887.     }  
    888.     #endregion  
    889.  
    890.     #region Rebar Notifications  
    891.     public enum RebarNotifications   
    892.     {  
    893.         RBN_FIRST           = (0-831),  
    894.         RBN_HEIGHTCHANGE    = (RBN_FIRST - 0),  
    895.         RBN_GETOBJECT       = (RBN_FIRST - 1),  
    896.         RBN_LAYOUTCHANGED   = (RBN_FIRST - 2),  
    897.         RBN_AUTOSIZE        = (RBN_FIRST - 3),  
    898.         RBN_BEGINDRAG       = (RBN_FIRST - 4),  
    899.         RBN_ENDDRAG         = (RBN_FIRST - 5),  
    900.         RBN_DELETINGBAND    = (RBN_FIRST - 6),     
    901.         RBN_DELETEDBAND     = (RBN_FIRST - 7),      
    902.         RBN_CHILDSIZE       = (RBN_FIRST - 8),  
    903.         RBN_CHEVRONPUSHED   = (RBN_FIRST - 10)  
    904.     }  
    905.     #endregion  
    906.  
    907.     #region Rebar Messages  
    908.     public enum RebarMessages  
    909.     {  
    910.         CCM_FIRST           =    0x2000,  
    911.         WM_USER             =    0x0400,  
    912.         RB_INSERTBANDA      =   (WM_USER +  1),  
    913.         RB_DELETEBAND       =   (WM_USER +  2),  
    914.         RB_GETBARINFO       =   (WM_USER +  3),  
    915.         RB_SETBARINFO       =   (WM_USER +  4),  
    916.         RB_GETBANDINFO      =   (WM_USER +  5),  
    917.         RB_SETBANDINFOA     =   (WM_USER +  6),  
    918.         RB_SETPARENT        =   (WM_USER +  7),  
    919.         RB_HITTEST          =   (WM_USER +  8),  
    920.         RB_GETRECT          =   (WM_USER +  9),  
    921.         RB_INSERTBANDW      =   (WM_USER +  10),  
    922.         RB_SETBANDINFOW     =   (WM_USER +  11),  
    923.         RB_GETBANDCOUNT     =   (WM_USER +  12),  
    924.         RB_GETROWCOUNT      =   (WM_USER +  13),  
    925.         RB_GETROWHEIGHT     =   (WM_USER +  14),  
    926.         RB_IDTOINDEX        =   (WM_USER +  16),  
    927.         RB_GETTOOLTIPS      =   (WM_USER +  17),  
    928.         RB_SETTOOLTIPS      =   (WM_USER +  18),  
    929.         RB_SETBKCOLOR       =   (WM_USER +  19),  
    930.         RB_GETBKCOLOR       =   (WM_USER +  20),   
    931.         RB_SETTEXTCOLOR     =   (WM_USER +  21),  
    932.         RB_GETTEXTCOLOR     =   (WM_USER +  22),  
    933.         RB_SIZETORECT       =   (WM_USER +  23),   
    934.         RB_SETCOLORSCHEME   =   (CCM_FIRST + 2),    
    935.         RB_GETCOLORSCHEME   =   (CCM_FIRST + 3),   
    936.         RB_BEGINDRAG        =   (WM_USER + 24),  
    937.         RB_ENDDRAG          =   (WM_USER + 25),  
    938.         RB_DRAGMOVE         =   (WM_USER + 26),  
    939.         RB_GETBARHEIGHT     =   (WM_USER + 27),  
    940.         RB_GETBANDINFOW     =   (WM_USER + 28),  
    941.         RB_GETBANDINFOA     =   (WM_USER + 29),  
    942.         RB_MINIMIZEBAND     =   (WM_USER + 30),  
    943.         RB_MAXIMIZEBAND     =   (WM_USER + 31),  
    944.         RB_GETDROPTARGET    =   (CCM_FIRST + 4),  
    945.         RB_GETBANDBORDERS   =   (WM_USER + 34),    
    946.         RB_SHOWBAND         =   (WM_USER + 35),        
    947.         RB_SETPALETTE       =   (WM_USER + 37),  
    948.         RB_GETPALETTE       =   (WM_USER + 38),  
    949.         RB_MOVEBAND         =   (WM_USER + 39),  
    950.         RB_SETUNICODEFORMAT =   (CCM_FIRST + 5),  
    951.         RB_GETUNICODEFORMAT =   (CCM_FIRST + 6)  
    952.     }  
    953.     #endregion  
    954.  
    955.     #region Rebar Info Mask  
    956.     public enum RebarInfoMask  
    957.     {  
    958.         RBBIM_STYLE         = 0x00000001,  
    959.         RBBIM_COLORS        = 0x00000002,  
    960.         RBBIM_TEXT          = 0x00000004,  
    961.         RBBIM_IMAGE         = 0x00000008,  
    962.         RBBIM_CHILD         = 0x00000010,  
    963.         RBBIM_CHILDSIZE     = 0x00000020,  
    964.         RBBIM_SIZE          = 0x00000040,  
    965.         RBBIM_BACKGROUND    = 0x00000080,  
    966.         RBBIM_ID            = 0x00000100,  
    967.         RBBIM_IDEALSIZE     = 0x00000200,  
    968.         RBBIM_LPARAM        = 0x00000400,  
    969.         BBIM_HEADERSIZE     = 0x00000800    
    970.     }  
    971.     #endregion  
    972.  
    973.     #region Rebar Styles  
    974.     public enum RebarStylesEx  
    975.     {  
    976.         RBBS_BREAK          =   0x1,  
    977.         RBBS_CHILDEDGE      =   0x4,  
    978.         RBBS_FIXEDBMP       =   0x20,  
    979.         RBBS_GRIPPERALWAYS  =   0x80,  
    980.         RBBS_USECHEVRON     =   0x200  
    981.     }  
    982.     #endregion  
    983.  
    984.     #region Object types  
    985.     public enum ObjectTypes  
    986.     {  
    987.         OBJ_PEN             = 1,  
    988.         OBJ_BRUSH           = 2,  
    989.         OBJ_DC              = 3,  
    990.         OBJ_METADC          = 4,  
    991.         OBJ_PAL             = 5,  
    992.         OBJ_FONT            = 6,  
    993.         OBJ_BITMAP          = 7,  
    994.         OBJ_REGION          = 8,  
    995.         OBJ_METAFILE        = 9,  
    996.         OBJ_MEMDC           = 10,  
    997.         OBJ_EXTPEN          = 11,  
    998.         OBJ_ENHMETADC       = 12,  
    999.         OBJ_ENHMETAFILE     = 13  
    1000.     }  
    1001.     #endregion  
    1002.  
    1003.     #region WM_MENUCHAR return values  
    1004.     public enum MenuCharReturnValues  
    1005.     {  
    1006.         MNC_IGNORE  = 0,  
    1007.         MNC_CLOSE   = 1,  
    1008.         MNC_EXECUTE = 2,  
    1009.         MNC_SELECT  = 3  
    1010.     }  
    1011.     #endregion  
    1012.  
    1013.     #region Background Mode  
    1014.     public enum BackgroundMode  
    1015.     {  
    1016.         TRANSPARENT = 1,  
    1017.         OPAQUE = 2  
    1018.     }  
    1019.     #endregion  
    1020.  
    1021.     #region ListView Messages  
    1022.     public enum ListViewMessages  
    1023.     {  
    1024.         LVM_FIRST           =    0x1000,  
    1025.         LVM_GETSUBITEMRECT  = (LVM_FIRST + 56),  
    1026.         LVM_GETITEMSTATE    = (LVM_FIRST + 44),  
    1027.         LVM_GETITEMTEXTW    = (LVM_FIRST + 115)  
    1028.     }  
    1029.     #endregion  
    1030.  
    1031.     #region Header Control Messages  
    1032.     public enum HeaderControlMessages : int  
    1033.     {  
    1034.         HDM_FIRST        =  0x1200,  
    1035.         HDM_GETITEMRECT  = (HDM_FIRST + 7),  
    1036.         HDM_HITTEST      = (HDM_FIRST + 6),  
    1037.         HDM_SETIMAGELIST = (HDM_FIRST + 8),  
    1038.         HDM_GETITEMW     = (HDM_FIRST + 11),  
    1039.         HDM_ORDERTOINDEX = (HDM_FIRST + 15)  
    1040.     }  
    1041.     #endregion  
    1042.  
    1043.     #region Header Control Notifications  
    1044.     public enum HeaderControlNotifications  
    1045.     {  
    1046.         HDN_FIRST       = (0-300),  
    1047.         HDN_BEGINTRACKW = (HDN_FIRST-26),  
    1048.         HDN_ENDTRACKW   = (HDN_FIRST-27),  
    1049.         HDN_ITEMCLICKW  = (HDN_FIRST-22),  
    1050.     }  
    1051.     #endregion  
    1052.  
    1053.     #region Header Control HitTest Flags  
    1054.     public enum HeaderControlHitTestFlags : uint  
    1055.     {  
    1056.         HHT_NOWHERE             = 0x0001,  
    1057.         HHT_ONHEADER            = 0x0002,  
    1058.         HHT_ONDIVIDER           = 0x0004,  
    1059.         HHT_ONDIVOPEN           = 0x0008,  
    1060.         HHT_ABOVE               = 0x0100,  
    1061.         HHT_BELOW               = 0x0200,  
    1062.         HHT_TORIGHT             = 0x0400,  
    1063.         HHT_TOLEFT              = 0x0800  
    1064.     }  
    1065.     #endregion  
    1066.  
    1067.     #region List View sub item portion  
    1068.     public enum SubItemPortion  
    1069.     {  
    1070.         LVIR_BOUNDS = 0,  
    1071.         LVIR_ICON   = 1,  
    1072.         LVIR_LABEL  = 2  
    1073.     }  
    1074.     #endregion  
    1075.  
    1076.     #region Cursor Type  
    1077.     public enum CursorType : uint  
    1078.     {  
    1079.         IDC_ARROW       = 32512U,  
    1080.         IDC_IBEAM       = 32513U,  
    1081.         IDC_WAIT        = 32514U,  
    1082.         IDC_CROSS       = 32515U,  
    1083.         IDC_UPARROW     = 32516U,  
    1084.         IDC_SIZE        = 32640U,  
    1085.         IDC_ICON        = 32641U,  
    1086.         IDC_SIZENWSE    = 32642U,  
    1087.         IDC_SIZENESW    = 32643U,  
    1088.         IDC_SIZEWE      = 32644U,  
    1089.         IDC_SIZENS      = 32645U,  
    1090.         IDC_SIZEALL     = 32646U,  
    1091.         IDC_NO          = 32648U,  
    1092.         IDC_HAND        = 32649U,  
    1093.         IDC_APPSTARTING = 32650U,  
    1094.         IDC_HELP        = 32651U  
    1095.     }  
    1096.     #endregion  
    1097.      
    1098.     #region Tracker Event Flags  
    1099.     public enum TrackerEventFlags : uint  
    1100.     {  
    1101.         TME_HOVER   = 0x00000001,  
    1102.         TME_LEAVE   = 0x00000002,  
    1103.         TME_QUERY   = 0x40000000,  
    1104.         TME_CANCEL  = 0x80000000  
    1105.     }  
    1106.     #endregion  
    1107.  
    1108.     #region Mouse Activate Flags  
    1109.     public enum MouseActivateFlags  
    1110.     {  
    1111.         MA_ACTIVATE         = 1,  
    1112.         MA_ACTIVATEANDEAT   = 2,  
    1113.         MA_NOACTIVATE       = 3,  
    1114.         MA_NOACTIVATEANDEAT = 4  
    1115.     }  
    1116.     #endregion  
    1117.  
    1118.     #region Dialog Codes  
    1119.     public enum DialogCodes  
    1120.     {  
    1121.         DLGC_WANTARROWS         = 0x0001,  
    1122.         DLGC_WANTTAB            = 0x0002,  
    1123.         DLGC_WANTALLKEYS        = 0x0004,  
    1124.         DLGC_WANTMESSAGE        = 0x0004,  
    1125.         DLGC_HASSETSEL          = 0x0008,  
    1126.         DLGC_DEFPUSHBUTTON      = 0x0010,  
    1127.         DLGC_UNDEFPUSHBUTTON    = 0x0020,  
    1128.         DLGC_RADIOBUTTON        = 0x0040,  
    1129.         DLGC_WANTCHARS          = 0x0080,  
    1130.         DLGC_STATIC             = 0x0100,  
    1131.         DLGC_BUTTON             = 0x2000  
    1132.     }  
    1133.     #endregion  
    1134.  
    1135.     #region Update Layered Windows Flags  
    1136.     public enum UpdateLayeredWindowsFlags  
    1137.     {  
    1138.         ULW_COLORKEY = 0x00000001,  
    1139.         ULW_ALPHA    = 0x00000002,  
    1140.         ULW_OPAQUE   = 0x00000004  
    1141.     }  
    1142.     #endregion  
    1143.  
    1144.     #region Alpha Flags  
    1145.     public enum AlphaFlags : byte  
    1146.     {  
    1147.         AC_SRC_OVER  = 0x00,  
    1148.         AC_SRC_ALPHA = 0x01  
    1149.     }  
    1150.     #endregion  
    1151.  
    1152.     #region ComboBox messages  
    1153.     public enum ComboBoxMessages  
    1154.     {  
    1155.         CB_GETDROPPEDSTATE = 0x0157  
    1156.     }  
    1157.     #endregion  
    1158.  
    1159.     #region SetWindowLong indexes  
    1160.     public enum SetWindowLongOffsets  
    1161.     {  
    1162.         GWL_WNDPROC     = (-4),  
    1163.         GWL_HINSTANCE   = (-6),  
    1164.         GWL_HWNDPARENT  = (-8),  
    1165.         GWL_STYLE       = (-16),  
    1166.         GWL_EXSTYLE     = (-20),  
    1167.         GWL_USERDATA    = (-21),  
    1168.         GWL_ID          = (-12)  
    1169.     }  
    1170.     #endregion  
    1171.  
    1172.     #region TreeView Messages  
    1173.     public enum TreeViewMessages  
    1174.     {  
    1175.         TV_FIRST        =  0x1100,  
    1176.         TVM_GETITEMRECT = (TV_FIRST + 4),  
    1177.         TVM_GETITEMW    = (TV_FIRST + 62)  
    1178.     }  
    1179.     #endregion  
    1180.  
    1181.     #region TreeViewItem Flags  
    1182.     public enum TreeViewItemFlags  
    1183.     {  
    1184.         TVIF_TEXT               = 0x0001,  
    1185.         TVIF_IMAGE              = 0x0002,  
    1186.         TVIF_PARAM              = 0x0004,  
    1187.         TVIF_STATE              = 0x0008,  
    1188.         TVIF_HANDLE             = 0x0010,  
    1189.         TVIF_SELECTEDIMAGE      = 0x0020,  
    1190.         TVIF_CHILDREN           = 0x0040,  
    1191.         TVIF_INTEGRAL           = 0x0080  
    1192.     }  
    1193.     #endregion  
    1194.  
    1195.     #region ListViewItem flags  
    1196.     public enum ListViewItemFlags  
    1197.     {  
    1198.         LVIF_TEXT               = 0x0001,  
    1199.         LVIF_IMAGE              = 0x0002,  
    1200.         LVIF_PARAM              = 0x0004,  
    1201.         LVIF_STATE              = 0x0008,  
    1202.         LVIF_INDENT             = 0x0010,  
    1203.         LVIF_NORECOMPUTE        = 0x0800  
    1204.     }  
    1205.     #endregion  
    1206.  
    1207.     #region HeaderItem flags  
    1208.     public enum HeaderItemFlags  
    1209.     {  
    1210.         HDI_WIDTH               = 0x0001,  
    1211.         HDI_HEIGHT              = HDI_WIDTH,  
    1212.         HDI_TEXT                = 0x0002,  
    1213.         HDI_FORMAT              = 0x0004,  
    1214.         HDI_LPARAM              = 0x0008,  
    1215.         HDI_BITMAP              = 0x0010,  
    1216.         HDI_IMAGE               = 0x0020,  
    1217.         HDI_DI_SETITEM          = 0x0040,  
    1218.         HDI_ORDER               = 0x0080  
    1219.     }  
    1220.     #endregion  
    1221.  
    1222.     #region GetDCExFlags  
    1223.     public enum GetDCExFlags  
    1224.     {  
    1225.         DCX_WINDOW           = 0x00000001,  
    1226.         DCX_CACHE            = 0x00000002,  
    1227.         DCX_NORESETATTRS     = 0x00000004,  
    1228.         DCX_CLIPCHILDREN     = 0x00000008,  
    1229.         DCX_CLIPSIBLINGS     = 0x00000010,  
    1230.         DCX_PARENTCLIP       = 0x00000020,  
    1231.         DCX_EXCLUDERGN       = 0x00000040,  
    1232.         DCX_INTERSECTRGN     = 0x00000080,  
    1233.         DCX_EXCLUDEUPDATE    = 0x00000100,  
    1234.         DCX_INTERSECTUPDATE  = 0x00000200,  
    1235.         DCX_LOCKWINDOWUPDATE = 0x00000400,  
    1236.         DCX_VALIDATE         = 0x00200000  
    1237.     }  
    1238.     #endregion  
    1239.  
    1240.     #region HitTest   
    1241.     public enum HitTest  
    1242.     {  
    1243.         HTERROR             = (-2),  
    1244.         HTTRANSPARENT       = (-1),  
    1245.         HTNOWHERE           =   0,  
    1246.         HTCLIENT            =   1,  
    1247.         HTCAPTION           =   2,  
    1248.         HTSYSMENU           =   3,  
    1249.         HTGROWBOX           =   4,  
    1250.         HTSIZE              =   HTGROWBOX,  
    1251.         HTMENU              =   5,  
    1252.         HTHSCROLL           =   6,  
    1253.         HTVSCROLL           =   7,  
    1254.         HTMINBUTTON         =   8,  
    1255.         HTMAXBUTTON         =   9,  
    1256.         HTLEFT              =   10,  
    1257.         HTRIGHT             =   11,  
    1258.         HTTOP               =   12,  
    1259.         HTTOPLEFT           =   13,  
    1260.         HTTOPRIGHT          =   14,  
    1261.         HTBOTTOM            =   15,  
    1262.         HTBOTTOMLEFT        =   16,  
    1263.         HTBOTTOMRIGHT       =   17,  
    1264.         HTBORDER            =   18,  
    1265.         HTREDUCE            =   HTMINBUTTON,  
    1266.         HTZOOM              =   HTMAXBUTTON,  
    1267.         HTSIZEFIRST         =   HTLEFT,  
    1268.         HTSIZELAST          =   HTBOTTOMRIGHT,  
    1269.         HTOBJECT            =   19,  
    1270.         HTCLOSE             =   20,  
    1271.         HTHELP              =   21  
    1272.     }  
    1273.     #endregion  
    1274.  
    1275.     #region ActivateFlags  
    1276.     public enum ActivateState  
    1277.     {  
    1278.         WA_INACTIVE     = 0,  
    1279.         WA_ACTIVE       = 1,  
    1280.         WA_CLICKACTIVE  = 2  
    1281.     }  
    1282.     #endregion  
    1283.  
    1284.     #region StrechModeFlags  
    1285.     public enum StrechModeFlags  
    1286.     {  
    1287.         BLACKONWHITE        = 1,  
    1288.         WHITEONBLACK        = 2,  
    1289.         COLORONCOLOR        = 3,  
    1290.         HALFTONE            = 4,  
    1291.         MAXSTRETCHBLTMODE   = 4  
    1292.     }  
    1293.     #endregion  
    1294.  
    1295.     #region ScrollBarFlags  
    1296.     public enum ScrollBarFlags  
    1297.     {  
    1298.         SBS_HORZ                    = 0x0000,  
    1299.         SBS_VERT                    = 0x0001,  
    1300.         SBS_TOPALIGN                = 0x0002,  
    1301.         SBS_LEFTALIGN               = 0x0002,  
    1302.         SBS_BOTTOMALIGN             = 0x0004,  
    1303.         SBS_RIGHTALIGN              = 0x0004,  
    1304.         SBS_SIZEBOXTOPLEFTALIGN     = 0x0002,  
    1305.         SBS_SIZEBOXBOTTOMRIGHTALIGN = 0x0004,  
    1306.         SBS_SIZEBOX                 = 0x0008,  
    1307.         SBS_SIZEGRIP                = 0x0010  
    1308.     }  
    1309.     #endregion  
    1310.  
    1311.     #region System Metrics Codes  
    1312.     public enum SystemMetricsCodes  
    1313.     {  
    1314.         SM_CXSCREEN             = 0,  
    1315.         SM_CYSCREEN             = 1,  
    1316.         SM_CXVSCROLL            = 2,  
    1317.         SM_CYHSCROLL            = 3,  
    1318.         SM_CYCAPTION            = 4,  
    1319.         SM_CXBORDER             = 5,  
    1320.         SM_CYBORDER             = 6,  
    1321.         SM_CXDLGFRAME           = 7,  
    1322.         SM_CYDLGFRAME           = 8,  
    1323.         SM_CYVTHUMB             = 9,  
    1324.         SM_CXHTHUMB             = 10,  
    1325.         SM_CXICON               = 11,  
    1326.         SM_CYICON               = 12,  
    1327.         SM_CXCURSOR             = 13,  
    1328.         SM_CYCURSOR             = 14,  
    1329.         SM_CYMENU               = 15,  
    1330.         SM_CXFULLSCREEN         = 16,  
    1331.         SM_CYFULLSCREEN         = 17,  
    1332.         SM_CYKANJIWINDOW        = 18,  
    1333.         SM_MOUSEPRESENT         = 19,  
    1334.         SM_CYVSCROLL            = 20,  
    1335.         SM_CXHSCROLL            = 21,  
    1336.         SM_DEBUG                = 22,  
    1337.         SM_SWAPBUTTON           = 23,  
    1338.         SM_RESERVED1            = 24,  
    1339.         SM_RESERVED2            = 25,  
    1340.         SM_RESERVED3            = 26,  
    1341.         SM_RESERVED4            = 27,  
    1342.         SM_CXMIN                = 28,  
    1343.         SM_CYMIN                = 29,  
    1344.         SM_CXSIZE               = 30,  
    1345.         SM_CYSIZE               = 31,  
    1346.         SM_CXFRAME              = 32,  
    1347.         SM_CYFRAME              = 33,  
    1348.         SM_CXMINTRACK           = 34,  
    1349.         SM_CYMINTRACK           = 35,  
    1350.         SM_CXDOUBLECLK          = 36,  
    1351.         SM_CYDOUBLECLK          = 37,  
    1352.         SM_CXICONSPACING        = 38,  
    1353.         SM_CYICONSPACING        = 39,  
    1354.         SM_MENUDROPALIGNMENT    = 40,  
    1355.         SM_PENWINDOWS           = 41,  
    1356.         SM_DBCSENABLED          = 42,  
    1357.         SM_CMOUSEBUTTONS        = 43,  
    1358.         SM_CXFIXEDFRAME         = SM_CXDLGFRAME,   
    1359.         SM_CYFIXEDFRAME         = SM_CYDLGFRAME,    
    1360.         SM_CXSIZEFRAME          = SM_CXFRAME,      
    1361.         SM_CYSIZEFRAME          = SM_CYFRAME,      
    1362.         SM_SECURE               = 44,  
    1363.         SM_CXEDGE               = 45,  
    1364.         SM_CYEDGE               = 46,  
    1365.         SM_CXMINSPACING         = 47,  
    1366.         SM_CYMINSPACING         = 48,  
    1367.         SM_CXSMICON             = 49,  
    1368.         SM_CYSMICON             = 50,  
    1369.         SM_CYSMCAPTION          = 51,  
    1370.         SM_CXSMSIZE             = 52,  
    1371.         SM_CYSMSIZE             = 53,  
    1372.         SM_CXMENUSIZE           = 54,  
    1373.         SM_CYMENUSIZE           = 55,  
    1374.         SM_ARRANGE              = 56,  
    1375.         SM_CXMINIMIZED          = 57,  
    1376.         SM_CYMINIMIZED          = 58,  
    1377.         SM_CXMAXTRACK           = 59,  
    1378.         SM_CYMAXTRACK           = 60,  
    1379.         SM_CXMAXIMIZED          = 61,  
    1380.         SM_CYMAXIMIZED          = 62,  
    1381.         SM_NETWORK              = 63,  
    1382.         SM_CLEANBOOT            = 67,  
    1383.         SM_CXDRAG               = 68,  
    1384.         SM_CYDRAG               = 69,  
    1385.         SM_SHOWSOUNDS           = 70,  
    1386.         SM_CXMENUCHECK          = 71,    
    1387.         SM_CYMENUCHECK          = 72,  
    1388.         SM_SLOWMACHINE          = 73,  
    1389.         SM_MIDEASTENABLED       = 74,  
    1390.         SM_MOUSEWHEELPRESENT    = 75,  
    1391.         SM_XVIRTUALSCREEN       = 76,  
    1392.         SM_YVIRTUALSCREEN       = 77,  
    1393.         SM_CXVIRTUALSCREEN      = 78,  
    1394.         SM_CYVIRTUALSCREEN      = 79,  
    1395.         SM_CMONITORS            = 80,  
    1396.         SM_SAMEDISPLAYFORMAT    = 81,  
    1397.         SM_CMETRICS             = 83  
    1398.     }  
    1399.     #endregion  
    1400.  
    1401.     #region ScrollBarTypes  
    1402.     public enum ScrollBarTypes  
    1403.     {  
    1404.         SB_HORZ  = 0,  
    1405.         SB_VERT  = 1,  
    1406.         SB_CTL   = 2,  
    1407.         SB_BOTH  = 3  
    1408.     }  
    1409.     #endregion  
    1410.  
    1411.     #region SrollBarInfoFlags  
    1412.     public enum ScrollBarInfoFlags  
    1413.     {  
    1414.         SIF_RANGE           = 0x0001,  
    1415.         SIF_PAGE            = 0x0002,  
    1416.         SIF_POS             = 0x0004,  
    1417.         SIF_DISABLENOSCROLL = 0x0008,  
    1418.         SIF_TRACKPOS        = 0x0010,  
    1419.         SIF_ALL             = (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)  
    1420.     }  
    1421.     #endregion  
    1422.  
    1423.     #region Enable ScrollBar flags  
    1424.     public enum EnableScrollBarFlags  
    1425.     {  
    1426.         ESB_ENABLE_BOTH     = 0x0000,  
    1427.         ESB_DISABLE_BOTH    = 0x0003,  
    1428.         ESB_DISABLE_LEFT    = 0x0001,  
    1429.         ESB_DISABLE_RIGHT   = 0x0002,  
    1430.         ESB_DISABLE_UP      = 0x0001,  
    1431.         ESB_DISABLE_DOWN    = 0x0002,  
    1432.         ESB_DISABLE_LTUP    = ESB_DISABLE_LEFT,  
    1433.         ESB_DISABLE_RTDN    = ESB_DISABLE_RIGHT  
    1434.     }  
    1435.     #endregion  
    1436.  
    1437.     #region Scroll Requests  
    1438.     public enum ScrollBarRequests  
    1439.     {  
    1440.         SB_LINEUP           = 0,  
    1441.         SB_LINELEFT         = 0,  
    1442.         SB_LINEDOWN         = 1,  
    1443.         SB_LINERIGHT        = 1,  
    1444.         SB_PAGEUP           = 2,  
    1445.         SB_PAGELEFT         = 2,  
    1446.         SB_PAGEDOWN         = 3,  
    1447.         SB_PAGERIGHT        = 3,  
    1448.         SB_THUMBPOSITION    = 4,  
    1449.         SB_THUMBTRACK       = 5,  
    1450.         SB_TOP              = 6,  
    1451.         SB_LEFT             = 6,  
    1452.         SB_BOTTOM           = 7,  
    1453.         SB_RIGHT            = 7,  
    1454.         SB_ENDSCROLL        = 8  
    1455.     }  
    1456.     #endregion  
    1457.  
    1458.     #region SrollWindowEx flags  
    1459.     public enum ScrollWindowExFlags  
    1460.     {  
    1461.         SW_SCROLLCHILDREN   = 0x0001,    
    1462.         SW_INVALIDATE       = 0x0002,    
    1463.         SW_ERASE            = 0x0004,    
    1464.         SW_SMOOTHSCROLL     = 0x0010    
    1465.     }  
    1466.     #endregion  
    1467.  
    1468.     #region ImageListFlags  
    1469.     public enum  ImageListFlags  
    1470.     {  
    1471.         ILC_MASK             = 0x0001,  
    1472.         ILC_COLOR            = 0x0000,  
    1473.         ILC_COLORDDB         = 0x00FE,  
    1474.         ILC_COLOR4           = 0x0004,  
    1475.         ILC_COLOR8           = 0x0008,  
    1476.         ILC_COLOR16          = 0x0010,  
    1477.         ILC_COLOR24          = 0x0018,  
    1478.         ILC_COLOR32          = 0x0020,  
    1479.         ILC_PALETTE          = 0x0800        
    1480.     }  
    1481.     #endregion  
    1482.  
    1483.     #region List View Notifications  
    1484.     public enum ListViewNotifications  
    1485.     {  
    1486.         LVN_FIRST             =  (0-100),  
    1487.         LVN_GETDISPINFOW      = (LVN_FIRST-77),  
    1488.         LVN_SETDISPINFOA      = (LVN_FIRST-51)  
    1489.     }  
    1490.     #endregion  
    1491.   
    1492.   
    1493. }  

    Structs.cs分别如下

    [csharp] view plain copy
     
    1. using System;  
    2. using System.Drawing;  
    3. using System.Runtime.InteropServices;  
    4.   
    5. namespace Lordeo.Framework  
    6. {  
    7.       
    8.     /// <summary>  
    9.     /// Structures to interoperate with the Windows 32 API    
    10.     /// </summary>  
    11.      
    12.     #region SIZE  
    13.     [StructLayout(LayoutKind.Sequential)]  
    14.     public struct SIZE  
    15.     {  
    16.         public int cx;  
    17.         public int cy;  
    18.     }  
    19.     #endregion  
    20.  
    21.     #region RECT  
    22.     [StructLayout(LayoutKind.Sequential)]  
    23.     public struct RECT  
    24.     {  
    25.         public int left;  
    26.         public int top;  
    27.         public int right;  
    28.         public int bottom;  
    29.     }  
    30.     #endregion  
    31.  
    32.     #region INITCOMMONCONTROLSEX  
    33.     [StructLayout(LayoutKind.Sequential, Pack=1)]  
    34.     public class INITCOMMONCONTROLSEX   
    35.     {  
    36.         public int dwSize;  
    37.         public int dwICC;  
    38.     }  
    39.     #endregion  
    40.  
    41.     #region TBBUTTON  
    42.     [StructLayout(LayoutKind.Sequential, Pack=1)]  
    43.     public struct TBBUTTON   
    44.     {  
    45.         public int iBitmap;  
    46.         public int idCommand;  
    47.         public byte fsState;  
    48.         public byte fsStyle;  
    49.         public byte bReserved0;  
    50.         public byte bReserved1;  
    51.         public int dwData;  
    52.         public int iString;  
    53.     }  
    54.     #endregion  
    55.  
    56.     #region POINT  
    57.     [StructLayout(LayoutKind.Sequential)]  
    58.     public struct POINT  
    59.     {  
    60.         public int x;  
    61.         public int y;  
    62.     }  
    63.     #endregion  
    64.  
    65.     #region NMHDR  
    66.     [StructLayout(LayoutKind.Sequential)]  
    67.     public struct NMHDR  
    68.     {  
    69.         public IntPtr hwndFrom;  
    70.         public int idFrom;  
    71.         public int code;  
    72.     }  
    73.     #endregion  
    74.  
    75.     #region TOOLTIPTEXTA  
    76.     [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]  
    77.     public struct TOOLTIPTEXTA  
    78.     {  
    79.         public NMHDR hdr;  
    80.         public IntPtr lpszText;  
    81.         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=80)]  
    82.         public string szText;  
    83.         public IntPtr hinst;  
    84.         public int uFlags;  
    85.     }  
    86.     #endregion  
    87.  
    88.     #region TOOLTIPTEXT  
    89.     [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]  
    90.     public struct TOOLTIPTEXT  
    91.     {  
    92.         public NMHDR hdr;  
    93.         public IntPtr lpszText;  
    94.         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=80)]  
    95.         public string szText;  
    96.         public IntPtr hinst;  
    97.         public int uFlags;  
    98.     }  
    99.     #endregion  
    100.  
    101.     #region NMCUSTOMDRAW  
    102.     [StructLayout(LayoutKind.Sequential)]  
    103.     public struct NMCUSTOMDRAW  
    104.     {  
    105.         public NMHDR hdr;  
    106.         public int dwDrawStage;  
    107.         public IntPtr hdc;  
    108.         public RECT rc;  
    109.         public int dwItemSpec;  
    110.         public int uItemState;  
    111.         public int lItemlParam;  
    112.     }  
    113.     #endregion  
    114.  
    115.     #region NMTBCUSTOMDRAW  
    116.     [StructLayout(LayoutKind.Sequential)]  
    117.     public struct NMTBCUSTOMDRAW  
    118.     {  
    119.         public NMCUSTOMDRAW nmcd;  
    120.         public IntPtr hbrMonoDither;  
    121.         public IntPtr hbrLines;  
    122.         public IntPtr hpenLines;  
    123.         public int clrText;  
    124.         public int clrMark;  
    125.         public int clrTextHighlight;  
    126.         public int clrBtnFace;  
    127.         public int clrBtnHighlight;  
    128.         public int clrHighlightHotTrack;  
    129.         public RECT rcText;  
    130.         public int nStringBkMode;  
    131.         public int nHLStringBkMode;  
    132.     }  
    133.     #endregion  
    134.      
    135.     #region NMLVCUSTOMDRAW  
    136.     [StructLayout(LayoutKind.Sequential)]  
    137.     public struct NMLVCUSTOMDRAW   
    138.     {  
    139.         public NMCUSTOMDRAW nmcd;  
    140.         public uint clrText;  
    141.         public uint clrTextBk;  
    142.         public int iSubItem;  
    143.     }   
    144.     #endregion  
    145.  
    146.     #region TBBUTTONINFO  
    147.     [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]  
    148.     public struct TBBUTTONINFO  
    149.     {  
    150.         public int cbSize;  
    151.         public int dwMask;  
    152.         public int idCommand;  
    153.         public int iImage;  
    154.         public byte fsState;  
    155.         public byte fsStyle;  
    156.         public short cx;  
    157.         public IntPtr lParam;  
    158.         public IntPtr pszText;  
    159.         public int cchText;  
    160.     }  
    161.     #endregion  
    162.  
    163.     #region REBARBANDINFO  
    164.     [StructLayout(LayoutKind.Sequential)]  
    165.     public struct REBARBANDINFO  
    166.     {  
    167.         public int cbSize;  
    168.         public int fMask;  
    169.         public int fStyle;  
    170.         public int clrFore;  
    171.         public int clrBack;  
    172.         public IntPtr lpText;  
    173.         public int cch;  
    174.         public int iImage;  
    175.         public IntPtr hwndChild;  
    176.         public int cxMinChild;  
    177.         public int cyMinChild;  
    178.         public int cx;  
    179.         public IntPtr hbmBack;  
    180.         public int wID;  
    181.         public int cyChild;  
    182.         public int cyMaxChild;  
    183.         public int cyIntegral;  
    184.         public int cxIdeal;  
    185.         public int lParam;  
    186.         public int cxHeader;  
    187.     }  
    188.     #endregion  
    189.  
    190.     #region MOUSEHOOKSTRUCT  
    191.     [StructLayout(LayoutKind.Sequential)]  
    192.     public struct MOUSEHOOKSTRUCT   
    193.     {   
    194.         public POINT     pt;   
    195.         public IntPtr    hwnd;   
    196.         public int       wHitTestCode;   
    197.         public IntPtr    dwExtraInfo;   
    198.     }  
    199.     #endregion  
    200.  
    201.     #region NMTOOLBAR  
    202.     [StructLayout(LayoutKind.Sequential)]  
    203.     public struct NMTOOLBAR   
    204.     {  
    205.         public NMHDR        hdr;  
    206.         public int          iItem;  
    207.         public TBBUTTON     tbButton;  
    208.         public int          cchText;  
    209.         public IntPtr       pszText;  
    210.         public RECT         rcButton;   
    211.     }  
    212.     #endregion  
    213.      
    214.     #region NMREBARCHEVRON  
    215.     [StructLayout(LayoutKind.Sequential)]  
    216.     public struct NMREBARCHEVRON  
    217.     {  
    218.         public NMHDR hdr;  
    219.         public int uBand;  
    220.         public int wID;  
    221.         public int lParam;  
    222.         public RECT rc;  
    223.         public int lParamNM;  
    224.     }  
    225.     #endregion  
    226.  
    227.     #region BITMAP  
    228.     [StructLayout(LayoutKind.Sequential)]  
    229.     public struct BITMAP  
    230.     {  
    231.         public long   bmType;   
    232.         public long   bmWidth;   
    233.         public long   bmHeight;   
    234.         public long   bmWidthBytes;   
    235.         public short  bmPlanes;   
    236.         public short  bmBitsPixel;   
    237.         public IntPtr bmBits;   
    238.     }  
    239.     #endregion  
    240.   
    241.     #region BITMAPINFO_FLAT  
    242.     [StructLayout(LayoutKind.Sequential)]  
    243.     public struct BITMAPINFO_FLAT   
    244.     {  
    245.         public int      bmiHeader_biSize;  
    246.         public int      bmiHeader_biWidth;  
    247.         public int      bmiHeader_biHeight;  
    248.         public short    bmiHeader_biPlanes;  
    249.         public short    bmiHeader_biBitCount;  
    250.         public int      bmiHeader_biCompression;  
    251.         public int      bmiHeader_biSizeImage;  
    252.         public int      bmiHeader_biXPelsPerMeter;  
    253.         public int      bmiHeader_biYPelsPerMeter;  
    254.         public int      bmiHeader_biClrUsed;  
    255.         public int      bmiHeader_biClrImportant;  
    256.         [MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst=1024)]  
    257.         public byte[] bmiColors;   
    258.     }  
    259.     #endregion  
    260.  
    261.     #region RGBQUAD  
    262.     public struct RGBQUAD   
    263.     {  
    264.         public byte     rgbBlue;  
    265.         public byte     rgbGreen;  
    266.         public byte     rgbRed;  
    267.         public byte     rgbReserved;  
    268.     }  
    269.     #endregion  
    270.      
    271.     #region BITMAPINFOHEADER  
    272.     [StructLayout(LayoutKind.Sequential)]  
    273.     public class BITMAPINFOHEADER   
    274.     {  
    275.         public int      biSize = Marshal.SizeOf(typeof(BITMAPINFOHEADER));  
    276.         public int      biWidth;  
    277.         public int      biHeight;  
    278.         public short    biPlanes;  
    279.         public short    biBitCount;  
    280.         public int      biCompression;  
    281.         public int      biSizeImage;  
    282.         public int      biXPelsPerMeter;  
    283.         public int      biYPelsPerMeter;  
    284.         public int      biClrUsed;  
    285.         public int      biClrImportant;  
    286.     }  
    287.     #endregion  
    288.  
    289.     #region BITMAPINFO  
    290.     [StructLayout(LayoutKind.Sequential)]  
    291.     public class BITMAPINFO   
    292.     {  
    293.         public BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();  
    294.         [MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst=1024)]  
    295.         public byte[] bmiColors;   
    296.     }  
    297.     #endregion  
    298.  
    299.     #region PALETTEENTRY  
    300.     [StructLayout(LayoutKind.Sequential)]  
    301.     public struct PALETTEENTRY   
    302.     {  
    303.         public byte     peRed;  
    304.         public byte     peGreen;  
    305.         public byte     peBlue;  
    306.         public byte     peFlags;  
    307.     }  
    308.     #endregion  
    309.  
    310.     #region MSG  
    311.     [StructLayout(LayoutKind.Sequential)]  
    312.     public struct MSG   
    313.     {  
    314.         public IntPtr hwnd;  
    315.         public int message;  
    316.         public IntPtr wParam;  
    317.         public IntPtr lParam;  
    318.         public int time;  
    319.         public int pt_x;  
    320.         public int pt_y;  
    321.     }  
    322.     #endregion  
    323.  
    324.     #region HD_HITTESTINFO  
    325.     [StructLayout(LayoutKind.Sequential)]  
    326.     public struct HD_HITTESTINFO   
    327.     {    
    328.         public POINT pt;    
    329.         public uint flags;   
    330.         public int iItem;   
    331.     }  
    332.     #endregion  
    333.   
    334.     #region DLLVERSIONINFO  
    335.     [StructLayout(LayoutKind.Sequential)]  
    336.     public struct DLLVERSIONINFO  
    337.     {  
    338.         public int cbSize;  
    339.         public int dwMajorVersion;  
    340.         public int dwMinorVersion;  
    341.         public int dwBuildNumber;  
    342.         public int dwPlatformID;  
    343.     }  
    344.     #endregion  
    345.  
    346.     #region PAINTSTRUCT  
    347.     [StructLayout(LayoutKind.Sequential)]  
    348.     public struct PAINTSTRUCT  
    349.     {  
    350.         public IntPtr hdc;  
    351.         public int fErase;  
    352.         public Rectangle rcPaint;  
    353.         public int fRestore;  
    354.         public int fIncUpdate;  
    355.         public int Reserved1;  
    356.         public int Reserved2;  
    357.         public int Reserved3;  
    358.         public int Reserved4;  
    359.         public int Reserved5;  
    360.         public int Reserved6;  
    361.         public int Reserved7;  
    362.         public int Reserved8;  
    363.     }  
    364.     #endregion  
    365.  
    366.     #region BLENDFUNCTION  
    367.     [StructLayout(LayoutKind.Sequential, Pack=1)]  
    368.     public struct BLENDFUNCTION  
    369.     {  
    370.         public byte BlendOp;  
    371.         public byte BlendFlags;  
    372.         public byte SourceConstantAlpha;  
    373.         public byte AlphaFormat;  
    374.     }  
    375.  
    376.     #endregion  
    377.      
    378.     #region TRACKMOUSEEVENTS  
    379.     [StructLayout(LayoutKind.Sequential)]  
    380.     public struct TRACKMOUSEEVENTS  
    381.     {  
    382.         public uint cbSize;  
    383.         public uint dwFlags;  
    384.         public IntPtr hWnd;  
    385.         public uint dwHoverTime;  
    386.     }  
    387.     #endregion  
    388.  
    389.     #region STRINGBUFFER  
    390.     [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]  
    391.     public struct STRINGBUFFER  
    392.     {  
    393.         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=512)]  
    394.         public string szText;  
    395.     }  
    396.     #endregion  
    397.  
    398.     #region NMTVCUSTOMDRAW  
    399.     [StructLayout(LayoutKind.Sequential)]  
    400.     public struct NMTVCUSTOMDRAW   
    401.     {  
    402.         public NMCUSTOMDRAW nmcd;  
    403.         public uint clrText;  
    404.         public uint clrTextBk;  
    405.         public int iLevel;  
    406.     }  
    407.     #endregion  
    408.  
    409.     #region TVITEM  
    410.     [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]  
    411.     public struct TVITEM   
    412.     {  
    413.         public  uint      mask;  
    414.         public  IntPtr    hItem;  
    415.         public  uint      state;  
    416.         public  uint      stateMask;  
    417.         public  IntPtr    pszText;  
    418.         public  int       cchTextMax;  
    419.         public  int       iImage;  
    420.         public  int       iSelectedImage;  
    421.         public  int       cChildren;  
    422.         public  int       lParam;  
    423.     }   
    424.     #endregion  
    425.  
    426.     #region LVITEM  
    427.     [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]  
    428.     public struct LVITEM  
    429.     {  
    430.         public  uint mask;  
    431.         public  int iItem;  
    432.         public  int iSubItem;  
    433.         public  uint state;  
    434.         public  uint stateMask;  
    435.         public  IntPtr pszText;  
    436.         public  int cchTextMax;  
    437.         public  int iImage;  
    438.         public  int lParam;  
    439.         public  int iIndent;  
    440.     }  
    441.     #endregion  
    442.  
    443.     #region HDITEM  
    444.     [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]  
    445.     public struct HDITEM  
    446.     {  
    447.         public  uint    mask;  
    448.         public  int     cxy;  
    449.         public  IntPtr  pszText;  
    450.         public  IntPtr  hbm;  
    451.         public  int     cchTextMax;  
    452.         public  int     fmt;  
    453.         public  int     lParam;  
    454.         public  int     iImage;        
    455.         public  int     iOrder;  
    456.     }     
    457.     #endregion  
    458.  
    459.     #region WINDOWPLACEMENT  
    460.     [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]  
    461.     public struct WINDOWPLACEMENT  
    462.     {     
    463.         public uint length;   
    464.         public uint flags;   
    465.         public uint showCmd;   
    466.         public POINT ptMinPosition;   
    467.         public POINT ptMaxPosition;   
    468.         public RECT  rcNormalPosition;   
    469.     }  
    470.     #endregion  
    471.  
    472.     #region SCROLLINFO  
    473.     [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]  
    474.     public struct SCROLLINFO  
    475.     {  
    476.         public  uint   cbSize;  
    477.         public  uint   fMask;  
    478.         public  int    nMin;  
    479.         public  int    nMax;  
    480.         public  uint   nPage;  
    481.         public  int    nPos;  
    482.         public  int    nTrackPos;  
    483.     }  
    484.     #endregion  
    485.  
    486.     #region MouseHookStruct  
    487.     [StructLayout(LayoutKind.Sequential)]  
    488.     public class MouseHookStruct   
    489.     {  
    490.         public POINT pt;  
    491.         public int hwnd;  
    492.         public int wHitTestCode;  
    493.         public int dwExtraInfo;  
    494.     }  
    495.     #endregion  
    496.  
    497.     #region KeyBoardHook  
    498.     [StructLayout(LayoutKind.Sequential)]  
    499.     public class KeyboardHookStruct  
    500.     {  
    501.         public int vkCode;  //Specifies a virtual-key code. The code must be a value in the range 1 to 254.   
    502.         public int scanCode; // Specifies a hardware scan code for the key.   
    503.         public int flags;  // Specifies the extended-key flag, event-injected flag, context code, and transition-state flag.  
    504.         public int time; // Specifies the time stamp for this message.  
    505.         public int dwExtraInfo; // Specifies extra information associated with the message.   
    506.     }  
    507.     #endregion  
    508.                   
    509. }  

    http://blog.csdn.net/jiangxinyu/article/details/8099006

  • 相关阅读:
    (android高仿系列)今日头条 --新闻阅读器 (三) 完结 、总结 篇
    今日头条 --新闻阅读器
    免费新闻娱乐接口文档
    [代码片段] Android百度地图定位收索取周边在列表中展示并选择
    引用其它布局
    关于推广个人博客的经验_博客推广
    博客推广方法技巧
    android项目解刨之时间轴
    Android小项目:计算器
    Android项目技术总结:网络连接总结
  • 原文地址:https://www.cnblogs.com/findumars/p/5811400.html
Copyright © 2011-2022 走看看