@@ -48,6 +48,17 @@ public struct ScrollInfo
48
48
public int nTrackPos ;
49
49
}
50
50
51
+ /// <summary>
52
+ /// @see https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-nmhdr
53
+ /// </summary>
54
+ [ StructLayout ( LayoutKind . Sequential ) ]
55
+ public struct TagNMHDR
56
+ {
57
+ public IntPtr hwndFrom ;
58
+ public UIntPtr idFrom ;
59
+ public uint code ;
60
+ }
61
+
51
62
/// <summary>
52
63
/// Used for the ScrollInfo fMask
53
64
/// SIF_ALL => Combination of SIF_PAGE, SIF_POS, SIF_RANGE, and SIF_TRACKPOS.
@@ -302,6 +313,56 @@ public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, ref LangType
302
313
public static extern int CheckMenuItem ( IntPtr hmenu , int uIDCheckItem , int uCheck ) ;
303
314
304
315
public const int WM_CREATE = 1 ;
316
+ public const int WM_NOTIFY = 0x004e ;
317
+ public const int GWL_EXSTYLE = - 20 ;
318
+ public const int GWLP_HINSTANCE = - 6 ;
319
+ public const int GWLP_HWNDPARENT = - 8 ;
320
+ public const int GWLP_ID = - 12 ;
321
+ public const int GWL_STYLE = - 16 ;
322
+ public const int GWLP_USERDATA = - 21 ;
323
+ public const int GWLP_WNDPROC = - 4 ;
324
+ public const long WS_EX_ACCEPTFILES = 0x00000010L ;
325
+ public const long WS_EX_APPWINDOW = 0x00040000L ;
326
+ public const long WS_EX_CLIENTEDGE = 0x00000200L ;
327
+ public const long WS_EX_COMPOSITED = 0x02000000L ;
328
+ public const long WS_EX_CONTEXTHELP = 0x00000400L ;
329
+ public const long WS_EX_CONTROLPARENT = 0x00010000L ;
330
+ public const long WS_EX_DLGMODALFRAME = 0x00000001L ;
331
+ public const long WS_EX_LAYERED = 0x00080000L ;
332
+ public const long WS_EX_LAYOUTRTL = 0x00400000L ;
333
+ public const long WS_EX_LEFT = 0x00000000L ;
334
+ public const long WS_EX_LEFTSCROLLBAR = 0x00004000L ;
335
+ public const long WS_EX_LTRREADING = 0x00000000L ;
336
+ public const long WS_EX_MDICHILD = 0x00000040L ;
337
+ public const long WS_EX_NOACTIVATE = 0x08000000L ;
338
+ public const long WS_EX_NOINHERITLAYOUT = 0x00100000L ;
339
+ public const long WS_EX_NOPARENTNOTIFY = 0x00000004L ;
340
+ public const long WS_EX_NOREDIRECTIONBITMAP = 0x00200000L ;
341
+ public const long WS_EX_OVERLAPPEDWINDOW = ( WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE ) ;
342
+ public const long WS_EX_PALETTEWINDOW = ( WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST ) ;
343
+ public const long WS_EX_RIGHT = 0x00001000L ;
344
+ public const long WS_EX_RIGHTSCROLLBAR = 0x00000000L ;
345
+ public const long WS_EX_RTLREADING = 0x00002000L ;
346
+ public const long WS_EX_STATICEDGE = 0x00020000L ;
347
+ public const long WS_EX_TOOLWINDOW = 0x00000080L ;
348
+ public const long WS_EX_TOPMOST = 0x00000008L ;
349
+ public const long WS_EX_TRANSPARENT = 0x00000020L ;
350
+ public const long WS_EX_WINDOWEDGE = 0x00000100L ;
351
+
352
+ public delegate IntPtr WindowLongGetter ( IntPtr hWnd , int nIndex ) ;
353
+ public delegate IntPtr WindowLongSetter ( IntPtr hWnd , int nIndex , IntPtr dwNewLong ) ;
354
+
355
+ [ DllImport ( "user32" ) ]
356
+ public static extern IntPtr GetWindowLongPtr ( IntPtr hWnd , int nIndex ) ;
357
+
358
+ [ DllImport ( "user32" ) ]
359
+ public static extern IntPtr GetWindowLong ( IntPtr hWnd , int nIndex ) ;
360
+
361
+ [ DllImport ( "user32" ) ]
362
+ public static extern IntPtr SetWindowLongPtr ( IntPtr hWnd , int nIndex , IntPtr dwNewLong ) ;
363
+
364
+ [ DllImport ( "user32" ) ]
365
+ public static extern IntPtr SetWindowLong ( IntPtr hWnd , int nIndex , IntPtr dwNewLong ) ;
305
366
306
367
[ DllImport ( "user32" ) ]
307
368
public static extern bool ClientToScreen ( IntPtr hWnd , ref Point lpPoint ) ;
0 commit comments