<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Add Cut/Copy/Paste functionality to a Textbox</title>
	<atom:link href="http://www.christec.co.nz/blog/archives/146/feed" rel="self" type="application/rss+xml" />
	<link>http://www.christec.co.nz/blog/archives/146</link>
	<description>Development for a mobile world - Making a quality platform one application at a time</description>
	<lastBuildDate>Fri, 12 Mar 2010 05:38:21 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mikhail Diatchenko</title>
		<link>http://www.christec.co.nz/blog/archives/146/comment-page-1#comment-34176</link>
		<dc:creator>Mikhail Diatchenko</dc:creator>
		<pubDate>Tue, 08 Dec 2009 06:17:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.christec.co.nz/blog/archives/146#comment-34176</guid>
		<description>Does the new hWnd handle need to be released after the form is closed?</description>
		<content:encoded><![CDATA[<p>Does the new hWnd handle need to be released after the form is closed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brewwindow</title>
		<link>http://www.christec.co.nz/blog/archives/146/comment-page-1#comment-31202</link>
		<dc:creator>brewwindow</dc:creator>
		<pubDate>Tue, 29 Sep 2009 14:37:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.christec.co.nz/blog/archives/146#comment-31202</guid>
		<description>this code works fine for me to add cut paste functionality to edit control
but  this code also starts controlling sip-keyboard, which is undesired for me ,Is there any way by which I can add cut-paste functionality but control for sip-keyboard remains with me.</description>
		<content:encoded><![CDATA[<p>this code works fine for me to add cut paste functionality to edit control<br />
but  this code also starts controlling sip-keyboard, which is undesired for me ,Is there any way by which I can add cut-paste functionality but control for sip-keyboard remains with me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jose Zunom</title>
		<link>http://www.christec.co.nz/blog/archives/146/comment-page-1#comment-22983</link>
		<dc:creator>Jose Zunom</dc:creator>
		<pubDate>Thu, 12 Mar 2009 10:31:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.christec.co.nz/blog/archives/146#comment-22983</guid>
		<description>Hello,

thank you for the code. But I would like to comment that this code only adds the copy/cut/... context menu to the controls that are added directly in the form not any textBox added to a Panel or other containers.

So you have to do the same call with all the panel that have controls:

IntPtr hWnd = CreateWindowEx(0, WC_SIPPREF, &quot;&quot;, WS_CHILD,0, 0, 0, 0, panel1.Handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);

IntPtr hWnd = CreateWindowEx(0, WC_SIPPREF, &quot;&quot;, WS_CHILD,0, 0, 0, 0, panel2.Handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);

...

and so on.

By the way, congratulations by the blog.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>thank you for the code. But I would like to comment that this code only adds the copy/cut/&#8230; context menu to the controls that are added directly in the form not any textBox added to a Panel or other containers.</p>
<p>So you have to do the same call with all the panel that have controls:</p>
<p>IntPtr hWnd = CreateWindowEx(0, WC_SIPPREF, &#8220;&#8221;, WS_CHILD,0, 0, 0, 0, panel1.Handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);</p>
<p>IntPtr hWnd = CreateWindowEx(0, WC_SIPPREF, &#8220;&#8221;, WS_CHILD,0, 0, 0, 0, panel2.Handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);</p>
<p>&#8230;</p>
<p>and so on.</p>
<p>By the way, congratulations by the blog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MinhDanh</title>
		<link>http://www.christec.co.nz/blog/archives/146/comment-page-1#comment-22880</link>
		<dc:creator>MinhDanh</dc:creator>
		<pubDate>Tue, 10 Mar 2009 08:58:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.christec.co.nz/blog/archives/146#comment-22880</guid>
		<description>It basically works from .NET CF via P/Invoke. But I discover a few things

(1) If a panel is used and the textbox is inside that Panel, the handle of the panel (and not the form) needs to passed to hWndParent in the call to CreateWindowEx. If the form handle is to be passed, no context menu will appear

(2) Context menu won&#039;t appear on textboxes which are added to the form programmatically after the call to CreateWindowEx. Attempting to call CreateWindowEx again on the same form handle will hang the application!

(3) If an InputPanel is used to resize the form when the SIP appears, the context menu will disappear after a while. I am not sure exactly what triggers this, but I suspect it stops working either when the SIP is raised, or when the form is resized.

(4) Like Alex Prozor said, this will not work on a password textbox. When I tried this, my textbox is repainted properly but no context menu appears.

Any idea how to fix this? Thanks</description>
		<content:encoded><![CDATA[<p>It basically works from .NET CF via P/Invoke. But I discover a few things</p>
<p>(1) If a panel is used and the textbox is inside that Panel, the handle of the panel (and not the form) needs to passed to hWndParent in the call to CreateWindowEx. If the form handle is to be passed, no context menu will appear</p>
<p>(2) Context menu won&#8217;t appear on textboxes which are added to the form programmatically after the call to CreateWindowEx. Attempting to call CreateWindowEx again on the same form handle will hang the application!</p>
<p>(3) If an InputPanel is used to resize the form when the SIP appears, the context menu will disappear after a while. I am not sure exactly what triggers this, but I suspect it stops working either when the SIP is raised, or when the form is resized.</p>
<p>(4) Like Alex Prozor said, this will not work on a password textbox. When I tried this, my textbox is repainted properly but no context menu appears.</p>
<p>Any idea how to fix this? Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Prozor</title>
		<link>http://www.christec.co.nz/blog/archives/146/comment-page-1#comment-4542</link>
		<dc:creator>Alex Prozor</dc:creator>
		<pubDate>Mon, 03 Mar 2008 14:29:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.christec.co.nz/blog/archives/146#comment-4542</guid>
		<description>Hi, unfortunately it doesn&#039;t works on TextBoxes with non empty PasswordChar. (at least on WM6). 
Textbox doesn&#039;t repaint.
Do you have ideas how to fix it?</description>
		<content:encoded><![CDATA[<p>Hi, unfortunately it doesn&#8217;t works on TextBoxes with non empty PasswordChar. (at least on WM6).<br />
Textbox doesn&#8217;t repaint.<br />
Do you have ideas how to fix it?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
