<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="2.0">
  <channel>
    <title>HtmlEditor</title>
    <link>http://www.itwriting.com/phorum/list.php?3</link>
    <description><![CDATA[For discussion of the .Net HTMLEditor control]]></description>
    <language>EN</language>
    <pubDate>Thu, 05 Oct 2006 13:35:19 +0100</pubDate>
    <lastBuildDate>Thu, 05 Oct 2006 13:35:19 +0100</lastBuildDate>
    <category>HtmlEditor</category>
    <generator>Phorum 5.1.25</generator>
    <ttl>60</ttl>
    <item>
      <title>Re: Moved the caret, but lost focus</title>
      <link>http://www.itwriting.com/phorum/read.php?3,3337,3344#msg-3344</link>
      <author>Tim</author>
      <description><![CDATA[Glad you got it sorted.<br />
<br />
Tim]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,3337,3344#msg-3344</guid>
      <pubDate>Thu, 05 Oct 2006 13:35:19 +0100</pubDate>
    </item>
    <item>
      <title>Re: Moved the caret, but lost focus</title>
      <link>http://www.itwriting.com/phorum/read.php?3,3337,3339#msg-3339</link>
      <author>Duncan Bayne</author>
      <description><![CDATA[The solution is here:<br />
<br />
http://itwriting.com/phorum/read.php?f=3&amp;i=3130&amp;t=2806]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,3337,3339#msg-3339</guid>
      <pubDate>Tue, 03 Oct 2006 22:47:03 +0100</pubDate>
    </item>
    <item>
      <title>Re: Moved the caret, but lost focus</title>
      <link>http://www.itwriting.com/phorum/read.php?3,3337,3338#msg-3338</link>
      <author>Duncan Bayne</author>
      <description><![CDATA[Okay, I am *definitely* doing something wrong ... because later on I see the following:<br />
<br />
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.   at onlyconnect.IHTMLCaret.GetLocation(win32POINT&amp; pPoint, Boolean fTranslate)<br />
   at onlyconnect.HtmlSite.UpdateUI()]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,3337,3338#msg-3338</guid>
      <pubDate>Fri, 29 Sep 2006 07:11:49 +0100</pubDate>
    </item>
    <item>
      <title>Moved the caret, but lost focus</title>
      <link>http://www.itwriting.com/phorum/read.php?3,3337,3337#msg-3337</link>
      <author>Duncan Bayne</author>
      <description><![CDATA[Hi All,<br />
<br />
I am using the following code (with error-handling removed for clarity) to insert some text and then move the caret back to the top of the document, so that the user can begin typing.<br />
<br />
However, although this happens, and the caret can be seen to be at the top of the document, keystrokes are ignored; I can type to my heart's content and no characters appear.  In order to make it work, I must click in the HtmlEditor control, at which point the keystrokes are recognised.<br />
<br />
I suspect I'm missing something obvious?<br />
<br />
TIA for any suggestions.<br />
<br />
Yours,<br />
Duncan Bayne<br />
<br />
<br />
<br />
<br />
// add the signature to the top of the HTML editor<br />
<br />
onlyconnect.IHTMLSelectionObject selection = replyHtmlEditor.HtmlDocument2.GetSelection();<br />
onlyconnect.IHTMLTxtRange textRange = (onlyconnect.IHTMLTxtRange)selection.createRange();<br />
<br />
textRange.text = signature;<br />
<br />
// now move the cursor back to the top<br />
<br />
onlyconnect.IHTMLElement documentElement = textRange.parentElement();<br />
onlyconnect.IHTMLCaret caret;            <br />
onlyconnect.IDisplayServices dsServices = (onlyconnect.IDisplayServices)replyHtmlEditor.Document;<br />
dsServices.GetCaret(out caret);<br />
<br />
onlyconnect.IDisplayPointer displayPointer;<br />
dsServices.CreateDisplayPointer(out displayPointer);<br />
<br />
caret.MoveCaretToPointer(displayPointer, true, onlyconnect.CARET_DIRECTION.CARET_DIRECTION_BACKWARD);]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,3337,3337#msg-3337</guid>
      <pubDate>Fri, 29 Sep 2006 06:59:11 +0100</pubDate>
    </item>
  </channel>
</rss>
