Foot Wetter - Mouse Pointer

Foot Wetter - Mouse Pointer

Anonymous
Not applicable
455 Views
5 Replies
Message 1 of 6

Foot Wetter - Mouse Pointer

Anonymous
Not applicable
I am developing a full featured AutoCAD Add-in, currently using VBA.

For a start, I would like to change the Mouse Pointer, or Icon, to reflect
the status of the running VBA Macro. Does anyone have a quick tip where to
set the mouse pointer, or sample that would help me figure it out?

Thanks, Dave
0 Likes
456 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Sorry, let me clarify this.

I am trying to fill in the short comings of VBA with ObjectARX or AutoLISP
or whatever works. We will be converting entirely to ObjectARX in the
future.

So to start this process, I would like top figure out how to set a custom
Mouse Cursor or Pointer using ObjectARX.

Any pointers? 😉

Thanks, Dave
0 Likes
Message 3 of 6

Anonymous
Not applicable
Is this really such a difficult thing? Even in ARX??

Can anybody hear me? tap tap tap......
0 Likes
Message 4 of 6

Anonymous
Not applicable
You'd think there'd be one quick command to do this - but i couldn't find
that one command. I posted a similar question several times, and never got
an answer.

Here's what i've come up with. Create a point filter, or a point monitor
(AcEdInputPointFilter, AcEdInputPointMonitor) and make sure it's been added
to your current document. Next, make a call to disableSystemCursorGraphics
to turn off the AutoCAD pointer. Finally, make sure that your point filter
or monitor calls SetCursor every time it is executed (anytime the user moves
the mouse) to switch the cursor for your desired effect.

"DC Deno" wrote in message
news:f0cd5ca.1@WebX.maYIadrTaRb...
> Is this really such a difficult thing? Even in ARX??
>
> Can anybody hear me? tap tap tap......
>
>
0 Likes
Message 5 of 6

Anonymous
Not applicable
Excellent, thanks for that Justavian.

Looks like I'm gonna get a soaker right off the bat 🙂

I'll still appreciate any other comments.

Dave
0 Likes
Message 6 of 6

Anonymous
Not applicable
Don't get discouraged. The AcEdInputPointFilter looks like it's
ridiculously complicated, because of all of the arguments being passed to
it, but it's not as tough as it seems. Actually, if all you intend to do is
change the cursor, it should be quite easy. You can use the wizard bar (the
ObjectARX Input Point API button) to create a filter for you, and all you
should have to do is have some sort of global variable that determines if
your custom cursor should be shown (or some other manner of determining
that).

In the ProcessInputPoint( ) function, simply add the following lines (this
assumes that the variable 'ShowCustomCursor' is a global bool....


if(ShowCustomCursor)
{
// First, disable AutoCAD's default cursor.
// This only needs to be done once, so first check to see if
// it has already been disabled.
if(curDoc()->inputPointManager()->systemCursorDisableCount()==0)
curDoc()->inputPointManager()->disableSystemCursorGraphics();

// Now you're ready to show your cursor (assuming that
// myCursor is a valid HCURSOR that you previously loaded
// (something like myCursor =
acedGetAcadWinApp()->LoadCursor(IDC_HANDCUR); )
SetCursor(myCursor);

}
else
{
// We should NOT display the custom cursor - make sure the standard
// AutoCAD cursor is on....
if(curDoc()->inputPointManager()->systemCursorDisableCount()==1)
curDoc()->inputPointManager()->enableSystemCursorGraphics();
}


That's all there is to it! Again, i'm not sure if this is the best way to
do it, but i rely on this quite a bit since i change the cursor in all sorts
of different situations. I guess as long as it works, right?





"DC Deno" wrote in message
news:ACF88428C251CB7189B854B8174F6E5B@in.WebX.maYIadrTaRb...
> Excellent, thanks for that Justavian.
>
> Looks like I'm gonna get a soaker right off the bat 🙂
>
> I'll still appreciate any other comments.
>
> Dave
>
>
0 Likes