<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx</link><description>For temporarily drawing into somebody else's window.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1726987</link><pubDate>Tue, 20 Feb 2007 18:15:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1726987</guid><dc:creator>BryanK</dc:creator><description>&lt;p&gt;&amp;quot;Make sure the prince doesn't leave this room until I come and get him.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Not to leave the room, even if you come and get him.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;No, no, until. &amp;nbsp;Until I come and get him.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Until you come and get him, we're not to enter the room.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;No, no, no. &amp;nbsp;You stay in the room, and make sure he doesn't leave.&amp;quot;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;:-P&lt;/p&gt;
</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1727154</link><pubDate>Tue, 20 Feb 2007 18:45:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1727154</guid><dc:creator>S</dc:creator><description>&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;quot;Yesterday, I could left click the corner of a rectangle, &lt;/p&gt;
&lt;p&gt;move the corner, and the rectangle would resize as the corner &lt;/p&gt;
&lt;p&gt;was moved, until the left mouse button was released. &amp;quot;&lt;/p&gt;
&lt;p&gt;...then...&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;quot;Today the rectangle doesn't change size until I release &lt;/p&gt;
&lt;p&gt;the left mouse button. &amp;nbsp;It then snaps into position as I &lt;/p&gt;
&lt;p&gt;want.&amp;quot;&lt;/p&gt;
&lt;p&gt;I wonder what crazy stuff will happen to him tomorrow? &lt;/p&gt;
</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1728028</link><pubDate>Tue, 20 Feb 2007 20:33:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1728028</guid><dc:creator>Luke</dc:creator><description>&lt;p&gt;It is interesting that you say LockWindowUpdate was intended for dragging. &amp;nbsp;A while ago I wrote a .NET regular expression testing app (&lt;a rel="nofollow" target="_new" href="http://luke.breuer.com/images/regextest.png"&gt;http://luke.breuer.com/images/regextest.png&lt;/a&gt;); it will execute the regex you are forming every time the regex changes or the text to be searched changes. &amp;nbsp;Due to the Win32 RichTextBox's (RTB) slowness, I call LockWindowUpdate on the lower RTB when matching. &amp;nbsp;I discovered that if the amount of text in the lower (locked) RTB exceeds its visible area, every time it is updated it flickers, as well as several other windows on my multiple screens. &amp;nbsp;Outlook 2007's e-mail listview and toolbars flicker, quite a bit of Visual Studio flickers, as do the groupbox labels in Process Explorer's System Information window. &amp;nbsp;Neither Firefox nor Foobar2000 flicker.&lt;/p&gt;
&lt;p&gt;I've noticed this flickering in other circumstances, like minimizing and then maximizing Visual Studio. &amp;nbsp;Might this all have to do with LockWindowUpdate being used incorrectly? &amp;nbsp;Is there much hope for a) figuring out what is going on and b) fixing it? (I am using XP SP2.)&lt;/p&gt;
</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1728340</link><pubDate>Tue, 20 Feb 2007 21:17:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1728340</guid><dc:creator>B.Y.</dc:creator><description>&lt;p&gt;SDK documentation often doesn't state the intended purpose of various things, leaving the users to guess. This is a big problem.&lt;/p&gt;
</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1728494</link><pubDate>Tue, 20 Feb 2007 21:39:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1728494</guid><dc:creator>Mr Echo</dc:creator><description>&lt;p&gt;So the answer to my question from yesterday is that &amp;quot;dragging&amp;quot; is the semaphore that synchronizes between different apps.&lt;/p&gt;
&lt;p&gt;I wonder how this woud work with MultiPoint (&lt;a rel="nofollow" target="_new" href="http://www.microsoft.com/presspass/features/2006/dec06/12-14MultiPoint.mspx"&gt;http://www.microsoft.com/presspass/features/2006/dec06/12-14MultiPoint.mspx&lt;/a&gt;)&lt;/p&gt;
</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1728495</link><pubDate>Tue, 20 Feb 2007 21:39:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1728495</guid><dc:creator>Ivo</dc:creator><description>&lt;p&gt;Few questions about LockWindowUpdate:&lt;/p&gt;
&lt;p&gt;1) Does it affect the non-client area? The documentation makes no mention of it.&lt;/p&gt;
&lt;p&gt;2) The docs say &amp;quot;A locked window cannot be moved.&amp;quot;. Does that mean I'm not allowed to move it, or that the move will have no effect, or that it will be deferred until I unlock it?&lt;/p&gt;
</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1728500</link><pubDate>Tue, 20 Feb 2007 21:40:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1728500</guid><dc:creator>El Guapo</dc:creator><description>&lt;P&gt;I also tried to use LockWindowUpdate when adding a lot of items to a ListView. Nevermind if this was wise or not. The point is that the whole desktop and windows on it were flickering like crazy. I quickly learned not to use that function.&lt;/P&gt;
&lt;P&gt;Sorry Raymond, but some type of comment in the documentation as to the intended use of the function is definintely called for here. What is the purpose of documentation? Should you intentionally hide information just because it doesnt fit in correctly with your world view?&lt;/P&gt;
&lt;P&gt;Just the number of sheer developers having problems with this function should make that obvious to you, unless you are just plain stubborn.&lt;/P&gt;
&lt;DIV class=post&gt;[&lt;I&gt;It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery. -Raymond&lt;/I&gt;]&lt;/DIV&gt;</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1729619</link><pubDate>Tue, 20 Feb 2007 23:56:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1729619</guid><dc:creator>Stefan Kuhr</dc:creator><description>&lt;p&gt;Is there a chance you will demonstrate the proper use of LockWindowUpdate as described above in a modification to your scratch sample during this series on LWU or will you leave this as an exercise to your readers?&lt;/p&gt;
</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1730681</link><pubDate>Wed, 21 Feb 2007 01:50:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1730681</guid><dc:creator>Dean Harding</dc:creator><description>&lt;p&gt;&amp;gt; It appears that everybody is under the impression that I approve of the documentation.&lt;/p&gt;
&lt;p&gt;Well, it seems clear that many people actually think you WRITE the documentation...&lt;/p&gt;
&lt;p&gt;There is a better description of LockWindowUpdate, if you start at the documentation page for LockWindowUpdate, click on &amp;quot;Painting and Drawing Overview&amp;quot; then &amp;quot;About Painting and Drawing&amp;quot; then &amp;quot;Window Update Lock&amp;quot;.&lt;/p&gt;
&lt;p&gt;I'll be the first to admit, however, that this extra description is a) really tough to find (unless you already know what you're looking for) and b) rather cryptic.&lt;/p&gt;
&lt;p&gt;Mind you, Raymond's post from yesterday is already the #3 result when you search for LockWindowUpdate on google...&lt;/p&gt;
</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1732081</link><pubDate>Wed, 21 Feb 2007 05:43:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1732081</guid><dc:creator>Lon</dc:creator><description>&lt;p&gt;Actualy its number #2 now.&lt;/p&gt;</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1732130</link><pubDate>Wed, 21 Feb 2007 05:59:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1732130</guid><dc:creator>Metanitpicker</dc:creator><description>&lt;p&gt;&amp;gt; The mistake was in the initial order to the&lt;/p&gt;
&lt;p&gt;&amp;gt; guard. You should have said, &amp;quot;Nobody except&lt;/p&gt;
&lt;p&gt;&amp;gt; me is allowed into this room.&amp;quot;&lt;/p&gt;
&lt;p&gt;Hey. &amp;nbsp;Who let that nitpicker into a blog whose owner scolds nitpickers?&lt;/p&gt;
&lt;p&gt;&amp;gt; And DCX_LOCKWINDOWUPDATE is how you tell the&lt;/p&gt;
&lt;p&gt;&amp;gt; window manager, &amp;quot;It's me. Let me in.&amp;quot;&lt;/p&gt;
&lt;p&gt;Hey! &amp;nbsp;Who let that nitpicker into Win32?&lt;/p&gt;</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1732190</link><pubDate>Wed, 21 Feb 2007 06:15:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1732190</guid><dc:creator>Dean Harding</dc:creator><description>&lt;p&gt;Metanitpicker: Um, what are you talking about? Are you trying to say that computers should talk &amp;quot;casual English&amp;quot; (like a blog), rather than assembly language (like they currently do)?&lt;/p&gt;
</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1735048</link><pubDate>Wed, 21 Feb 2007 15:59:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1735048</guid><dc:creator>Eric D. Burdo</dc:creator><description>&lt;p&gt;A place I used to work used the LockWindowsUpdate with a semaphore and VB6. &amp;nbsp;It was to prevent the screen from drawing while we did lots of work behind the scenes.&lt;/p&gt;
&lt;p&gt;It wasn't pretty, but it worked pretty well.&lt;/p&gt;
</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1735238</link><pubDate>Wed, 21 Feb 2007 17:00:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1735238</guid><dc:creator>Jonathan Wilson</dc:creator><description>&lt;p&gt;I really love seeing these posts from Raymond (and other MS blogs too) with all sorts of cool stuff about how windows does what it does (and why it does it that way). All the cool stuff you just don't see in MSDN :)&lt;/p&gt;
&lt;p&gt;Now all we need is for someone from the DirectX team to start blogging about cool stuff to do with that part of windows :P&lt;/p&gt;
</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1736137</link><pubDate>Wed, 21 Feb 2007 20:22:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1736137</guid><dc:creator>Mihai</dc:creator><description>&lt;p&gt;&amp;lt;&amp;lt;Due to the Win32 RichTextBox's (RTB) slowness, I call LockWindowUpdate on the lower RTB when matching.&amp;gt;&amp;gt;&lt;/p&gt;
&lt;p&gt;In order to temporary &amp;quot;freeze&amp;quot; the RTF you must get the IRichEditOle object (using EM_GETOLEINTERFACE). &lt;/p&gt;
&lt;p&gt;IRichEditOle also supports the ITextDocument interface. On that one you call Freeze and Unfreeze.&lt;/p&gt;
</description></item><item><title>re: How is LockWindowUpdate meant to be used?</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/02/20/1726880.aspx#1737812</link><pubDate>Thu, 22 Feb 2007 02:44:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1737812</guid><dc:creator>RIck C</dc:creator><description>&lt;p&gt;&amp;lt;blockquote&amp;gt;Few questions about LockWindowUpdate:&lt;/p&gt;
&lt;p&gt;1) Does it affect the non-client area? The documentation makes no mention of it.&amp;lt;/blockquote&amp;gt;&lt;/p&gt;
&lt;p&gt;Ivo, that's easy enough to answer: &amp;nbsp;start with Raymond's scratch application, and test it yourself. &amp;nbsp;Lock the window and attempt to draw on the nonclient area.&lt;/p&gt;
</description></item></channel></rss>