View Single Post
Old 05-27-2005, 08:16 AM   #15
zorro
Phone Control Moderator
 
zorro's Avatar
 
Join Date: Mar 2004
Location: Munich, Germany
Posts: 1,901
Post Update!

As I metioned before, I've updated MouseWheelInput to provide the capability of using other hardware for input than a wheel mouse only. This is how it works:



All you need is the piece of software labled "Driver" to translate the input device commands into MWI commands. These are:
Code:
WM_WHEELBUTTONDOWN = WM_USER + 0 WM_WHEELBUTTONUP = WM_USER + 1 WM_WHEELSCROLL = WM_USER + 2 WM_ENTER = WM_USER + 3 WM_BACK = WM_USER + 4 WM_SWITCHMODE = WM_USER + 5

The only message that is transmitting a parameter is WM_WHEELSCROLL, which has to describe the scrolling direction in lParam:
>0 - scroll up
<0 - scroll down

Messages have to be sent using
Code:
SendMessage(handle, message, wParam, lParam)

Whereas the handle can be determined using
Code:
handle = FindWindow(null, "MouseWheelInput")

To enable this feature, set <UseMouseHook> to false in the configuration file.

A driver also may communicate via the FrodoComm interface. This can be accomplished by sending a specific notification (with PostMessageById or PostMessageByName) with:
FrodoCommMessageType : SET
FrodoCommMessageEventName: INPUT
FrodoCommMessageFormat: TEXT
The FrodoCommMessage can be one of these:
Code:
WHEELBUTTONDOWN WHEELBUTTONUP WHEELSCROLLUP WHEELSCROLLDOWN ENTER BACK SWITCHMODE

As you see also in the picture above, keystrokes can be sent to Windows or to FrodoComm (with a PostMessageBroadCast message).
To make it work with FrodoComm instead of Windows, set option <UseFrodoComm> to true in the configuration file.

You'll get then a FrodoCommMessageType Notify with FrodoCommMessageEventName KeyPress and a Xml message like this one:
<Key virtualKey="65">A</Key>


Enjoy playing around
__________________
Skinning to go... VisualDesigner2!

Last edited by zorro; 05-27-2005 at 02:42 PM.
zorro is offline