The Old New Thing

That's a great idea, it's on the list

The great thing about the taskbar is that everybody and their pet dog have an idea for how it can be improved. The bad thing about the taskbar is that everybody and their pet dog have an idea for how it can be improved. (And everybody and their pet dog also think that their feature suggestion is the important one that should be worked on next...
Comments are closed.0Other

How do I accept files to be opened via IDropTarget instead of on the command line? – bonus content

One of my colleagues tipped me off to some additional resources on the subject of using the DropTarget technique for accepting files for execution. First, it turns out that there is an SDK sample that demonstrates the DropTarget technique after all. This sample is fifteen years late according to one commenter who apparently thinks that the...
Comments are closed.0Code

Every window with the WS_SYSMENU style has a system menu, but it's not there until it needs to be

I mentioned last time that there's an optimization in the treatment of the system menu which significantly reduces the number of menus in the system. When a window has the WS_SYSMENU window style, it has a system menu, but until somebody calls Get­System­Menu on that window, nobody knows what its menu handle is. Until that point, the...
Comments are closed.0Code

When will the window manager destroy a menu automatically, and when do I need to do it manually?

Our old friend Norman Diamond wonders when you are supposed to destroy a menu and when you are supposed to let Windows destroy it. The rules for when the window manager implicitly destroys menus are actually not that complicated. Outside of the above situations, you are on your own. Of course, when I write that "you are on your own" ...
Comments are closed.0Code

How do I find the bounding box for a character in a font?

A customer had the following question: I'm looking for a way to get the height of text which consists entirely of digits, for example "123", as these characters do not have any descent or internal leading. I expected functions like Get­Text­Extent to return the character's ascent minus the internal leading, but in fact it returns ...
Comments are closed.0Code

Cliff Notes: The short version of the Cliff Mass blog

Cliff Mass is Professor of Atmospheric Sciences at the University of Washington. To those of us in the Seattle area, he's a weather celebrity, appearing every Friday on local public radio station KUOW to provide a weekend weather forecast and discuss other weather issues. His blog covers similar material, such as his explanation of why ...

Why doesn't the Windows Vista copy progress dialog show the names of the files being copied?

When you copy multiple files in Windows Vista, the progress dialog gives you an estimate of the time remaining as well as an indication of what fraction of the operation has been completed. But one thing it doesn't tell you is the name of the file currently being copied. Why not? The programmer responsible for the file copy progress dialog in...

Welcome to The New Old New Thing, 2010 edition

The blog server folks tell me that the upgrade is complete. Thanks for your patience. I'm told they will throw the switch early this afternoon. The new URL for this site after the switchover will be http://blogs.msdn.com/b/oldnewthing/, although there should be 301 redirects at all the old URLs so your existing links will still work. My ...

What's the deal with What's This??

Via the suggestion box, Matthew Douglass-Riley wonders about the history and fate of the What's This? button. (The same question was repeated by an anonymous coward.) The What's This? button (more formally known as the contextual help caption button) is turned on by the WS_EX_CONTEXT­HELP extended style and takes the form of a question ...
Comments are closed.0Other

SHAutoComplete giveth, and SHAutoComplete taketh away

The SH­Auto­Complete function lets you attach autocomplete functionality to an edit control, and there are flags that describe what sources you want the autocomplete to draw from. If you call SH­Auto­Complete a second time, the second set of flags replace the original flags. The flags do not accumulate. For example, if you ...
Comments are closed.0Code