The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
What is the difference between Directory and DirectoryBackground?
One item I left off the list of special progids is . Recall that is the progid for file system folders (a subset of which represents all shell folders, both file system and virtual). Closely related is , which isn't really a progid, but it is a place where shell extensions can register themselves. Specifically, it's where context menu handlers can register if they want to appear when the user right-clicks on a blank space of a file system folder.
How do I quickly position two windows side by side using only the keyboard?
alexx is looking for a keyboard-only equivalent to the ctrl+click trick I mentioned a few days ago. Not as quick, but it still works. And it works even if the windows you want got converted into a group. Of course, on Windows 7, you can use the Win+Left and Win+Right hotkeys. (Users with multiple monitors can couple this with Win+Shift+Left and Win+Shift+Right.)
What is the difference between CSIDL_DESKTOP and CSIDL_DESKTOPDIRECTORY?
Among the various values you can pass to functions like are and . What's the difference between them? The is the virtual folder that represents the desktop. The contents of this virtual folder is what gets displayed on top of your wallpaper. The virtual folder is populated from various locations, some of them virtual, and some of them physical. The special folder is a physical folder that contains the files that you think of as on your desktop. These are the files that you've saved to your desktop, files that you've dragged to your desktop, that sort of thing. Some files on the desktop come from , which i...
The advantage of knowing your limits of discrimination
A story a while back about ridiculously expensive speaker cables and James Randi's challenge to tell the difference between them and modestly-priced cables reminded me of a conversation I had with a wine-loving friend of mine. He went on a wine tasting tour and sampled wines of varying quality and price. His conclusion was that he could detect the correlation between price and quality up until about $75/bottle. Beyond that point, the wines all tasted roughly equally great. Conclusion: There's no point in my friend spending more than about $75 on a bottle of wine. Once you know the limit of your discriminatio...
How do I put a window at the edge of the screen without triggering the automatic positioning behavior?
Grab it far from the edge you care about.
Mr. Lee CatCam lets you see what a cat does all day
Jürgen Perthold modified a lightweight camera and hung it around his cat's neck, snapping a picture every few minutes. Join Mr. Lee on a trip through the neighborhood. If those trips aren't enough, you can also see what Jacquie is up to.
How do I quickly position two windows side by side?
Commenter n/a posted a laundry list of feature requests. I'm not going to address all of them here (though I inadvertently addressed one of them a while ago). But today I'm going to address request number two, "A simple switch to create two windows, one alongside the other, vertically split." That feature has been around since Windows 95, possibly even before that but I haven't bothered to check. In the taskbar, click the button for the first window you want to position, then hold the Ctrl key and right-click the button for the second window. Select Tile Vertically. Bingo, the two windows are positioned ...
Conway-Kochen Free Will Theorem: Lecture series
Some time ago, there was a bit of excitement when researchers John H. Conway (best known to geeks as the inventor of The Game of Life, a Turing-complete cellular automaton) and Simon Kochen (best known to geeks as, um, okay, he's not known to geeks) concluded that if human beings have free will, then so too do elementary particles. In 2009, Conway gave a series of six one-hour lectures on this theorem. The lectures have been recorded and are available online. (I also found a nice summary of a public lecture by John Conway on the same subject, for those who are impatient and just want the one-page versi...
Polling by sleeping versus polling by waiting with a timeout
Commenter Francois Boucher asks it's better to write a background worker thread that polls with and a flag, or polls by waiting for an event with a timeout? "Which scenario is better? The first one uses only 1 handle for the thread. The second one will use 2. But is the first scenario wasting more thread time? Is it worth using the event (kernel object)?" Yeah, whatever. I don't quite understand why you want to pause every so often. Why not just do the work at low priority? When there are more important things to do, your background thread will stop doing whatever it's doing. When there is an available C...