WEvent Interface

WEvent is an interface exposed WMonitorX object (about WMonitorX component). In higher level languages than C++ (like C#, Visual Basic, Delphi) it works like a callback. In order to use it in C++ you should create an object that implements the WEvent interface.
Check out here our sample C++ project and for a better understanding read the WEventListener.h and WEventListener.cpp files from the sample project (see all Sample Projects).

This event is fired when the mouse and key configuration (which you set on the Main Window) is initiated by the user.

When implementing, you should pass it a callback function that has 5 parameters. Its (pseudo-code) header should be like this:

void CaptureEvent(int hwnd, int x1, int y1, int x2, int y2)
// use the WCaptureX object to effectively capture the clicked text

x1, y1
// are the screen coordinates where the user has clicked.

x2, y2
// are the screen coordinates where the user has ended the mouse gesture (dragging);
// if it is not the case of a dragging event, x2 will be equal to x1 and y2 will be equal to // y1.


// is the window handle of the window that received the click.

Check out our code samples below for a better understanding.