public class WinMessageHelper extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
WinMessageHelper.CustomUser32
Support different signature of User32
|
Modifier and Type | Field and Description |
---|---|
static WinMessageHelper.CustomUser32 |
customUser32 |
static int |
SC_CLOSE |
static int |
SC_MAXIMIZE |
static int |
SC_MINIMIZE |
static int |
SC_RESTORE |
static int |
SWP_HIDEWINDOW |
static int |
SWP_NOMOVE |
static int |
SWP_NOSIZE |
static int |
SWP_SHOWWINDOW |
static int |
WM_CAPTURECHANGED |
static int |
WM_DESTROY |
static int |
WM_ENTERSIZEMOVE |
static int |
WM_ERASEBKGND |
static int |
WM_EXITSIZEMOVE |
static int |
WM_KEYDOWN |
static int |
WM_KEYUP |
static int |
WM_KILLFOCUS |
static int |
WM_LBUTTONDOWN |
static int |
WM_LBUTTONUP |
static int |
WM_MOUSEMOVE |
static int |
WM_MOVE |
static int |
WM_MOVING |
static int |
WM_NCLBUTTONDBLCLK |
static int |
WM_NCLBUTTONUP |
static int |
WM_NOTIFY |
static int |
WM_PAINT |
static int |
WM_SETFOCUS |
static int |
WM_SIZE |
static int |
WM_SIZING |
static int |
WM_SYSCOMMAND |
static int |
WM_WINDOWPOSCHANGED |
static int |
WM_WINDOWPOSCHANGING |
Constructor and Description |
---|
WinMessageHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
hookWndProc(com.sun.jna.platform.win32.WinDef.HWND hwnd,
WindowProcCallback callback)
Makes a connection between messages on a specified window handle
and the callback to be called when messages are received.
|
static void |
main(String[] argv) |
static void |
unhookWndProc(com.sun.jna.platform.win32.WinDef.HWND hwnd)
Removes the WindowProc and restores previous one
|
public static final int WM_CAPTURECHANGED
public static final int WM_DESTROY
public static final int WM_ENTERSIZEMOVE
public static final int WM_ERASEBKGND
public static final int WM_EXITSIZEMOVE
public static final int WM_KEYDOWN
public static final int WM_KEYUP
public static final int WM_KILLFOCUS
public static final int WM_LBUTTONDOWN
public static final int WM_LBUTTONUP
public static final int WM_MOUSEMOVE
public static final int WM_MOVE
public static final int WM_MOVING
public static final int WM_NCLBUTTONDBLCLK
public static final int WM_NCLBUTTONUP
public static final int WM_NOTIFY
public static final int WM_SETFOCUS
public static final int WM_SIZE
public static final int WM_SIZING
public static final int WM_SYSCOMMAND
public static final int WM_WINDOWPOSCHANGED
public static final int WM_WINDOWPOSCHANGING
public static final int WM_PAINT
public static final int SC_CLOSE
public static final int SC_MAXIMIZE
public static final int SC_MINIMIZE
public static final int SC_RESTORE
public static final int SWP_HIDEWINDOW
public static final int SWP_NOMOVE
public static final int SWP_NOSIZE
public static final int SWP_SHOWWINDOW
public static WinMessageHelper.CustomUser32 customUser32
public static void hookWndProc(com.sun.jna.platform.win32.WinDef.HWND hwnd, WindowProcCallback callback)
hwnd
- HWND of the windowcallback
- callback for each messagepublic static void unhookWndProc(com.sun.jna.platform.win32.WinDef.HWND hwnd)
hwnd
- HWND of the windowpublic static void main(String[] argv)
Copyright © 2022. All rights reserved.