com.openfin.desktop.win32
Class WinMessageHelper

java.lang.Object
  extended by com.openfin.desktop.win32.WinMessageHelper

public class WinMessageHelper
extends Object

Helper class for hooking into Windows messages Created by wche on 3/11/15.


Nested Class Summary
static interface WinMessageHelper.CustomUser32
          Support different signature of User32
 
Field Summary
static WinMessageHelper.CustomUser32 customUser32
           
 
Constructor Summary
WinMessageHelper()
           
 
Method Summary
static void embedInto(long parentHwndId, Window childWindow, int width, int height, int left, int top, AckListener callback)
          Embeds a window in a target hWin
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 unhookWndProc(com.sun.jna.platform.win32.WinDef.HWND hwnd)
          Removes the WindowProc and restores previous one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

customUser32

public static WinMessageHelper.CustomUser32 customUser32
Constructor Detail

WinMessageHelper

public WinMessageHelper()
Method Detail

hookWndProc

public 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.

Parameters:
hwnd - HWND of the window
callback - callback for each message

unhookWndProc

public static void unhookWndProc(com.sun.jna.platform.win32.WinDef.HWND hwnd)
Removes the WindowProc and restores previous one

Parameters:
hwnd - HWND of the window

embedInto

public static void embedInto(long parentHwndId,
                             Window childWindow,
                             int width,
                             int height,
                             int left,
                             int top,
                             AckListener callback)
Embeds a window in a target hWin

Parameters:
parentHwndId - Parent window handle
childWindow - Child window
width - The change in the width of the window
height - The change in the height of the window
left - The left position of the window
top - The top position of the window
callback - callback for each messag e


Copyright © 2016. All rights reserved.