mfc >> moving text (rubberband effect)

by free2cric@yahoo.com » Wed, 22 Mar 2006 12:27:32 GMT

Hi,
I have been trying to have a rubber band effect with text placement
So I use XOR flag in CDC::SetROP2 in
CMovetextView::OnMouseMove(UINT nFlags, CPoint point)

and using DrawText to draw the text.. but thing is I am not getting the
rubberband effect.
I can see all the texts as I move the mouse on the view. Why is that
so.

Can anybody suggest code posting anywhere.

Thanks
Cric



mfc >> moving text (rubberband effect)

by Scott McPhillips [MVP] » Wed, 22 Mar 2006 22:17:46 GMT





The rubber band effect normally refers to line drawing, but you don't
seem to be doing any line drawing. What is a "rubber band effect with
text placement?"

I suspect that SetROP2 applies to line drawing but not text drawing. Do
you erase the old text before you draw the new text?

--
Scott McPhillips [VC++ MVP]




Similar Threads

1. rubberband effect with text placement

Hi
I need some artical or feedback on text with moving cursor. probably
this is an irritating repetitive post for many experienced gurus here.

Text string will be retreived from dialog edit box and seen moving with
the cursor in the view. As I click the left button, text should stop
moving and should placed at the point. I assume ROP functions wont help
here. TextOut will show the array of texts in the view. Should I keep
on updating the views
as the user moves the cursor in the OnMouseMove handler to avoid that.
I also
read somewhere to capture the bitmap of the text and erase it..
something liek that. I need to hav serialise support in this
application. I have achived rubberband effect with lines but text seems
to be hard.

Mine is a graphic application.

Kindly help me. 

Lee

2. How to create rubberband effect when drawing line? - CSharp/C#

3. Text effects: outline, shadow...in a RichTextBox?

Hi everyone,
I'm wondering if it's possible to add outlining or shadow to text in a
RichTextBox?  On www.bobpowell.net he has some tutorials on how to do
so using GDI+, which I realize isn't available for RTBs.  Is there a
way to reproduce the RTB control using GDI+ instead of GDI?
Or are there any other ways to go about this?

Thanks for reading/suggestions!
Nick Spacek

4. Why does tsSource[j].Text.ToUpper() causes side effects - CSharp/C#

5. Text effects: outline, shadow...in a RichTextBox?

Hi everyone,
I'm wondering if it's possible to add outlining or shadow to text in a
RichTextBox?  On www.bobpowell.net he has some tutorials on how to do
so using GDI+, which I realize isn't available for RTBs.  Is there a
way to reproduce the RTB control using GDI+ instead of GDI?
Or are there any other ways to go about this?

Thanks for reading/suggestions!
Nick Spacek

6. Video Card Performance Characteristics Effecting Text Glyph Rendering?

7. N3090 "Effects: Calls" vs "Effects: Equivalent to"

I see that the basic_string section of the fcd has been restructured
quite a bit. Probably a good thing, but I am a bit confused about the
difference between the uses of "Effects: Calls..." in some places and
"Effects: Equivalent to..." in other places.

Are these "Calls" to be taken literally?

For example, does

basic_string& operator+=(charT c);

  Effects: Calls append(1, c);
  Returns; *this

mean that all implementations of this operator must call append(1, c)
instead of the "more obvious" push_back(c) ?

If so, why?



Bo Persson



8. RubberBand In Form Boundary - CSharp/C#