View Single Post
  #14  
Old 05-19-2007, 08:16 AM
cnewtonne cnewtonne is online now
Registered User
 
Join Date: 07-27-2006
Posts: 503
Kinook,
I believe this discussion can lead to some good results. From what I have seen so far, I think we can get UR to provide support to these editing features. To be productive and focused, I would like, first, to propose a list of features to add so we can all agree on. Once we do, I think we can work together to implement it.

So, this is the list (to recap) ...
1- Create and apply text styles.
2- Change line spacing.
3- Allow multi-level indentation.
4- Pick up formatting: pick format attributes of existing selection and apply it on target one.

So to move forward on this, I did some research on the available API docs for RICHED20.DLL and it looks like all these features are already supported and they DO have the APIs to do them. Here are some details ...

Reference available here http://msdn.microsoft.com/library/de...itcontrols.asp

Format syltes (available as of version 3)
-------------------------------------------------------
Normal and heading styles Built-in normal style and heading styles 1 through 9 are supported by the EM_SETPARAFORMAT and Text Object Model (TOM) interfaces.

Format painter (RTF 4)
-------------------------------------------------------
- You can apply paragraph formatting by using the EM_SETPARAFORMAT message. To determine the current paragraph formatting for the selected text, use the EM_GETPARAFORMAT message. The PARAFORMAT or PARAFORMAT2 structure is used with both messages to specify paragraph formatting attributes.

- You can apply character formatting by using the EM_SETCHARFORMAT message. To determine the current character formatting for the selected text, you can use the EM_GETCHARFORMAT message. The CHARFORMAT or CHARFORMAT2 structure is used with both messages to specify character attributes.

- You can also use EM_SETCHARFORMAT and EM_GETCHARFORMAT messages to set and retrieve the character formatting of the insertion point, which is the formatting applied to any subsequently inserted characters. For example, if an application sets the default character formatting to bold and the user then types a character, that character is bold.

- The character formatting of the insertion point is applied to newly inserted text only if the current selection is empty (if the current selection is an insertion point). Otherwise, the new text assumes the character formatting of the text it replaces. If the selection changes, the default character formatting changes to match the first character in the new selection.

Default shorcuts
-------------------------------------------------------
I was kind of surprised to know that this control supported a default set of shortcuts. I tested most of them and they work just fine in Wordpad. For example, 'cntrl+1|2' in Wordpad will change line spacing. Also, 'cntrl+=' will apply superscript format. The least you can do is to allow users to use them in UR. Why override them and delete an entire functionality out of UR. If the control supports 'cntrl+1|2' for line spacing, why are you asking users to copy/paste their content to an external app to do it.
Here is the full list of shortcuts http://msdn.microsoft.com/library/de...itcontrols.asp

Kinook,
As a deliverable out of this discussion, can we proceed with these steps ...

- Can we first of all agree on this list of editing features.
- If we can, can we get a commitment from you to escalate this issue on top of your feature list for next maintenance release.

Whatever this might end up being, please do not give up on us and just ignore it. It can be done, you do have the expertise to do it, and we will do whatever it takes to support you doing it. So, again, do not give up on us.

Thank you again.
Reply With Quote