HighTechTalks DotNet Forums  

IDataObject & rtf format

Dotnet Framework (SDK) microsoft.public.dotnet.framework.sdk


Discuss IDataObject & rtf format in the Dotnet Framework (SDK) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
David Thielen
 
Posts: n/a

Default IDataObject & rtf format - 08-12-2009 , 06:46 PM






Hi;

Is there a way when providing an RTF formatted object to the clipboard
for it to start with the formatting of the document where it is being
dropped and then insert the stuff from the clipboard?

We presently pass a complete rtf document that is:

{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033 hi there}

But it always formats the "hi there" as Times New Roman 12 point. We
would like for it to use the formatting in play at the dropped
location.

We use RTF because we are actually dropping a field - I used the above
hi there to keep the sample clear. So we need to do rtf but don't want
it to start with the format in play.

Basically we want the rtf to be viewed as a chunk of rtf, not a
complete document.

??? - thanks - dave

david@at-at-at (AT) windward (DOT) dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Reply With Quote
  #2  
Old   
Jialiang Ge [MSFT]
 
Posts: n/a

Default RE: IDataObject & rtf format - 08-13-2009 , 05:47 AM






Hello Dave

I have a question regarding your requirement:

Suppose that the RTF formatted object in the clipboard is

"Hi World"

,where "Hi" is in Calibri 11 black, and "World" is in Arial 20 Red.

After it's dropped, do you expect all text become Times New Roman 12? Or
just "Hi" become Times New Roman 12?

Regards,
Jialiang Ge (jialge (AT) online (DOT) microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg (AT) microsoft (DOT) com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================

Reply With Quote
  #3  
Old   
David Thielen
 
Posts: n/a

Default Re: IDataObject & rtf format - 08-13-2009 , 10:28 AM



On Thu, 13 Aug 2009 10:47:14 GMT, jialge (AT) online (DOT) microsoft.com
("Jialiang Ge [MSFT]") wrote:

Quote:
Hello Dave

I have a question regarding your requirement:

Suppose that the RTF formatted object in the clipboard is

"Hi World"

,where "Hi" is in Calibri 11 black, and "World" is in Arial 20 Red.

After it's dropped, do you expect all text become Times New Roman 12? Or
just "Hi" become Times New Roman 12?
We don't use formatting but if we did, I would expect it to match what
was set in the clipboard object. So dropping "\b hi" would put hi in
bold.



david@at-at-at (AT) windward (DOT) dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Reply With Quote
  #4  
Old   
Jialiang Ge [MSFT]
 
Posts: n/a

Default Re: IDataObject & rtf format - 08-17-2009 , 07:03 AM



Hello Dave

I'm still researching this requirement with the RTF team. We have not found
the solutions yet, but we will continue trying. I will update you when we
have any progress.

Regards,
Jialiang Ge (jialge (AT) online (DOT) microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg (AT) microsoft (DOT) com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================

Reply With Quote
  #5  
Old   
Jialiang Ge [MSFT]
 
Posts: n/a

Default Re: IDataObject & rtf format - 08-20-2009 , 06:06 AM



Hello Dave

Currently we still don't know of a way to say to start with the current
character formatting short of including that formatting info in the RTF
itself. The \rtf1 control word implies \plain as well. RichEdit does take
the default point size from the target if SFF_SELECTION is active and no
\fcharsetN control word has been encountered (a feature for "NT 4.0
CharMap" so it's been there a while). You might try omitting the \deff0
control word as well as the font table. RichEdit does initialize the
"default" default font to the font at the insertion point, which is
guaranteed to be valid.

Regards,
Jialiang Ge (jialge (AT) online (DOT) microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg (AT) microsoft (DOT) com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================

Reply With Quote
  #6  
Old   
David Thielen
 
Posts: n/a

Default Re: IDataObject & rtf format - 08-21-2009 , 12:50 PM



On Thu, 20 Aug 2009 11:06:29 GMT, jialge (AT) online (DOT) microsoft.com
("Jialiang Ge [MSFT]") wrote:

Quote:
Hello Dave

Currently we still don't know of a way to say to start with the current
character formatting short of including that formatting info in the RTF
itself. The \rtf1 control word implies \plain as well. RichEdit does take
the default point size from the target if SFF_SELECTION is active and no
\fcharsetN control word has been encountered (a feature for "NT 4.0
CharMap" so it's been there a while). You might try omitting the \deff0
control word as well as the font table. RichEdit does initialize the
"default" default font to the font at the insertion point, which is
guaranteed to be valid.
Ok, thanks for trying. We can't read in the formatting at that
location because Word does not tell us where in the document it is
dropping the text.

thanks - dave

david@at-at-at (AT) windward (DOT) dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.