How do i have multiple cursors in my application.

  • Thread starter Thread starter berylwilson
  • Start date Start date
B

berylwilson

Hi all,

I have an MDI application, where the user can have more than one child
windows. Im trying to have a cursor for each child window and the
position of the cursor has to be synchronized with the cursor in the
active mdi child.

For this i have tried using a picture control with a arrow cursor image
loaded in the child form, and moving this with respect to the cursor in
the active form. This gives me the require illusion. But when i move
this over controls (like text box), i could see white backgroud
surronding the arrow image. I need to avoid this, and to have only the
arrow image.

I have also tried creating a form with this arrow image as background
and setting the transparent color key to the back color. this gave me
the required illusion. But im trying to do the same in a custom ctrl.
But in vain.

Any good suggestions to achive multiple cursor effect.

Thanks in advance.
Beryl Wilson
 
Beryl,

I would go about doing this somewhat differently.

What I would do is when the cursor leaves the form, I would detect the
position of the cursor and then draw that on the form over everything. This
way, it looks like the cursor location is stored.

When the cursor comes back into the form, I would invalidate the form,
and just let the OS handle the drawing of the cursor while it is moving
around in your form.

Hope this helps.
 
Hi Nicholas,

Thanks for the reply. I'm not sure how to implement this. Could you pls
help me with some code sample.

Thanks and regards,
Beryl Wilson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top