The Old New Thing

2009 Q1 link clearance: Microsoft blogger edition

It's that time again: Sending some link love to my colleagues. Updates: Fixed name of product Microsoft Expression (no "s"). Also, I think Arvin's blog is still up—it's just being masked by a doppelganger. Will update as information becomes available...

What is the implementation of WM_PRINTCLIENT?

Via the suggestion box, Martin Filteau asks Could you explain the implementation of WM_PRINTCLIENT? It seems that even MS got it wrong in the LISTBOX control. Try to AnimateWindow a window that as a LISTBOX control as a child. The LISTBOX displays correctly if it is NOT empty. However, if it is empty... nothing is drawn. I got a ...
Comments are closed.0 0
Code

I drive a car the way most people use a computer

It was interesting to me reading the reactions to my adventures driving a manual transmission. People seemed to be spending a lot of time trying to convince me that if only I were to expend a bit more effort in learning the finer points of driving a manual transmission and log enough time behind the wheel, then the activity will become less ...

The inability to lock someone out of the registry is a feature, not a bug

There is no way to lock the registry. Whereas you can open a file with a deny all sharing mode to prevent anyone else from opening the file, the registry has no such provision. You can't lock a registry key and prevent others from reading from or writing to it. There is an internal lock on the registry, but that's just to ensure that registry ...

Caption contest: The pinball machine

I may regret this, but here's something new: A caption contest. One of my colleagues saw this picture on a company's Web site. (image) The original caption for this picture was something like Join our affiliate program or Score big with our affiliate program. Your mission is to come up with something funnier. Here are some ideas to get you...

Double secret auto-arrange probation

When you view a folder for the first time, Explorer arranges the items in a nice default pattern. And when items are added to the folder, they get added to the end. And when you delete an item from the folder... the other items auto-arrange to close the gap? But wait, if you look at the View options, the Auto-Arrange option is not set. So ...

What’s the point of the MoveWindow function when we already have SetWindowPos?

Commenter Phil Quirk notes via the suggestion box, " is just a weird function. I guess it's easier to call than , but that's the only thing it seems to have going for it." Yup, that's about right. The function doesn't really do anything you couldn't already do yourself with . It's just a convenience function. And it you look at it pretty...
Comments are closed.0 0
Code

How to write like Raymond: Intentional typographical errors

I'm a pretty good speller. If I want to show impatience, I will type very fast and make no attempt to fix the typographical errors. Here's an example: Somebody asked me what the correct name is for a particular user interface element. i don't nkow. call up the online hep and see what the ycall it. It may surprise you to know that I am ...

Defense in depth means that you protect against exploits that don’t exist yet

Defense in depth is about protecting against threats that are already being protected against, just in case the existing protection fails. This is why there is not merely a lock on your safety deposit box, but also a lock on the door to the safety deposit box room, and then a lock on the doors of the bank itself. This is why you wear your seat...