THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/01/2011 at 03:29, xxxxxxxx wrote:
Hey Jack,
Here's the whole MouseInput() function.
ool ZoomToCursor::MouseInput(BaseDocument *doc, BaseContainer &data, BaseDraw *bd, EditorWindow *win, const BaseContainer &msg)
{
BaseContainer state;
Real mx = msg.GetReal(BFM_INPUT_X);
Real my = msg.GetReal(BFM_INPUT_Y);
LONG button;
switch (msg.GetLong(BFM_INPUT_CHANNEL))
{
case BFM_INPUT_MOUSELEFT : button=KEY_MLEFT; break;
case BFM_INPUT_MOUSERIGHT: button=KEY_MRIGHT; break;
default: return TRUE;
}
if(GetInputState(BFM_INPUT_MOUSE, BFM_INPUT_MOUSEWHEEL, data)){
BaseContainer bc = BaseContainer();
win->BfGetInputEvent(BFM_INPUT_MOUSE,&bc);
if (msg.GetLong(BFM_INPUT_CHANNEL)==BFM_INPUT_MOUSEWHEEL)
{
GePrint("The Wheel is Spinning");
}
}
return TRUE;
}
This is a tool plugin that I want to identify if the mousewheel is turning. If it is, I want some code to be initiated. This is really the only thing I have with this particular plugin at the moment because it all hinges on reading if the mouse wheel is turning. I just added the :
if(GetInputState(BFM_INPUT_MOUSE, BFM_INPUT_MOUSEWHEEL, data)){
and it still doesn't print the text to the console. Did I use the wrong device and channel constants for GetInputState() ?
I am also wondering if I am using the wrong basecontainer for storing the data.
~Shawn