Showing results for February 2007 - Page 2 of 4 - The Old New Thing

Feb 22, 2007
Post comments count0
Post likes count0

With what operations is LockWindowUpdate not meant to be used?

Raymond Chen
Raymond Chen

Okay, now that we know what operations is meant to be used with, we can look at various ways people misuse the function for things unrelated to dragging. People see the "the window you lock won't be able to redraw itself" behavior of and use it as a sort of lazy version of the message. Though sending the message really isn't that much harder ...

Code
Feb 21, 2007
Post comments count0
Post likes count0

Mandarin Chinese gaining popularity in public schools

Raymond Chen
Raymond Chen

NPR reports that Mandarin Chinese is gaining popularity in public schools. (But please oh please don't take pronunciations lessons from the student at time code 3:25. His first tone was clearly a second—falling victim to the classic mistake of applying English tone shaping to Chinese syllables.) On the other hand, some of those students wh...

Non-Computer
Feb 21, 2007
Post comments count0
Post likes count0

With what operations is LockWindowUpdate meant to be used?

Raymond Chen
Raymond Chen

As I noted earlier, the intended purpose of can be captured in one word: dragging. The simplest case of is used by the window manager when you move or resize a window and "Show window contents while dragging" is disabled. When you start the move/size operation, the window manager locks the entire desktop so it can draw the dotted-rectangle feed...

Code
Feb 20, 2007
Post comments count0
Post likes count0

Crush Finder experiment gets off the ground at Princeton

Raymond Chen
Raymond Chen

And who says these college students aren't getting anything done? The Princeton University student government announced, among other things, a web site wherein students could list up to five other people they have crushes on, and if two people list each other, the web site puts the two potential lovebirds in touch with each other. The site went o...

Non-Computer
Feb 20, 2007
Post comments count0
Post likes count0

How is LockWindowUpdate meant to be used?

Raymond Chen
Raymond Chen

Now that we know how works, we can look at what it is for. Actually, the intended purpose of can be captured in one word: dragging. But we'll get to that a little later. The purpose of is to allow a program to temporarily take over the responsibility of drawing a window. Of course, in order to do this, you have to prevent the window procedure...

Code
Feb 19, 2007
Post comments count0
Post likes count0

What does LockWindowUpdate do?

Raymond Chen
Raymond Chen

Poor misunderstood . This is the first in a series on , what it does, what it's for and (perhaps most important) what it's not for. What does is pretty simple. When a window is locked, all attempt to draw into it or its children fail. Instead of drawing, the window manager remembers which parts of the window the application tried to draw into...

Code
Feb 16, 2007
Post comments count0
Post likes count0

News flash: Professional athletes do it for the money

Raymond Chen
Raymond Chen

This weekend is NBA All-Star Weekend 2007, because just having a game isn't enough; you need to make it a weekend-long festival. Tyrus Thomas, invited to paricipate in the slam dunk contest, which comes with a top prize of $35,000, was quoted as saying I'm just going to go out there, get my check and call it a day. ... I'm just into the free mon...

Non-ComputerNews flash
Feb 16, 2007
Post comments count0
Post likes count0

Why don't I use any class libraries in my sample code?

Raymond Chen
Raymond Chen

As a general rule, I avoid using any class libraries in my sample code. This isn't because I'm opposed to class libraries, but rather because I don't want to narrow my audience to "people who use MFC" (to choose one popular class library). If I were to start using MFC for all of my samples, I'd probably lose all the people who don't use MFC. "Oh, ...

Code
Feb 15, 2007
Post comments count0
Post likes count0

There's not much luggage space, unless you dump the snow

Raymond Chen
Raymond Chen

Every year, Road and Track magazine reviews a strange vehicle in their April edition. Last year, it was the 1949 MG TC. But my favorite is their 2005 review of the Zamboni 500. [T]he Zamboni leaves the line with alacrity (revved to its 3000-rpm redline), rockets up to 9.7 mph and then stays at exactly that speed for the full 200-ft. length of...

Non-Computer
Feb 15, 2007
Post comments count0
Post likes count0

Why can't you set the command prompt's current directory to a UNC?

Raymond Chen
Raymond Chen

If you try to set the current directory of a command prompt, you get the error message "CMD does not support UNC paths as current directories." What's going on here? It's MS-DOS backwards compatibility. If the current directory were a UNC, there wouldn't be anything to return to MS-DOS programs when they call function 19h (Get current drive). Tha...

History