XP: using appropriate cursor with modifiers
- I have an XP command that uses a dynamic cursor drawing procedure
at one point. The routine works well, and returns RDC_ARROW to
show the arrow, which is fine. The problem occurs when a user
decides to use one of the modifiers (% along, endpoint, etc.)
when choosing a point when the dynamic cursor is showing. The
dynamic cursor still draws correctly, but the arrow cursor is
used no matter what CC2 is actually asking for from the user
(e.g. it should be showing a pickbox cursor if the user has to
choose an entity as a result of using a modifier).
How can I get my dynamic cursor procedure to recognize that a
modifier has been activated so that I may return another cursor
instead of RDC_ARROW? I'm assuming that there is some canonical
way of doing this, because CC2's POLY command, for example, uses
(I think) a dynamic cursor, and it works perfectly with any mod-
ifiers, showing the appropriate cursor at the appropriate time.
Does the canonical way of doing this involve installing a Win-
dows hook to listen for keystrokes, and interpreting what is
chosen? But that wouldn't work, since modifiers may also be
invoked by menu items and toolbar buttons...
Thanks as always,
- The POLY command uses RDC_XHOPT. This lets the user decide if an arrow or
the crosshair should be displayed. The RDC_XH forces the crosshair and
RDC_ARROW forces the arrow. The RDC_ARROW does not display the pick box for
modifiers. I know RDC_XHOPT does.
I don't know of a good way to detect that mofidiers are used. It might be
possible to check the RSC_InBufAdr resource for a modifier, but that sure is
an unsupported way of doing it. You are better off with the supported
- Peter Olsson wrote:
> The POLY command uses RDC_XHOPT. This lets the user decide if an arrow orThanks, that seems to work very well. I don't think I realized
> the crosshair should be displayed. The RDC_XH forces the crosshair and
> RDC_ARROW forces the arrow. The RDC_ARROW does not display the pick box for
> modifiers. I know RDC_XHOPT does.
exactly what benefit RDC_XHOPT provided until now. I appreciate