Showing archive results for 2009

Apr 15, 2009
Post comments count0
Post likes count1

Taxes redux: You can’t open the file until the user tells you to open it

Raymond Chen

One of the so-called taxes of software development on Windows is being respectful of Hierarchical Storage Management. You can't open a file until the user tells you to open it. This rule has consequences for how Explorer extracts information about a file, because what you definitely don't want is for opening a folder full of archived files in Expl...

Other
Apr 14, 2009
Post comments count0
Post likes count1

Microspeak: The plate

Raymond Chen

To have a lot on one's plate means to have a lot of tasks and responsibilities. We shouldn't give this task to Bob. He already has a lot on his plate. (Or: He already has a full plate.) At Microsoft, this common English language idiom is treated as a normal part of the language. The metaphorical plate has become a synonym for assigned tasks an...

OtherMicrospeak
Apr 13, 2009
Post comments count0
Post likes count1

Why is there no support in the window manager for mouse button chording?

Raymond Chen

Commenter Nekto2 asks why there is no mouse action associated with "click both buttons at the same time". The window manager doesn't fire a special event for both mouse buttons held down simultaneously like it does for double-clicks. As with higher-order clicks, mouse chording is something that you have to put together yourself from the basic m...

Other
Apr 10, 2009
Post comments count0
Post likes count1

When people ask to disable drag and drop, they often are trying to disable accidental drag and drop

Raymond Chen

We occasionally get customers who ask, "How do I disable drag and drop?" This is an odd request, so we ask the frequent follow-up question, "What are you really trying to do?" For many of these customers, the answer goes something like this: We've found that our employees often accidentally move or copy items around on the desktop and in Explorer...

Tips/Support
Apr 9, 2009
Post comments count0
Post likes count1

Being able to call a function without using GetProcAddress is not a security vulnerability

Raymond Chen

Another genre in the sporadic category of dubious security vulnerability is people who find an unusual way of accomplishing something perfectly normal but declare it a security vulnerability because they found an unusual way of doing it. Security is important to all computers users, from families at home to employees of government agencies, and ...

Other
Apr 8, 2009
Post comments count0
Post likes count0

Let GDI do your RLE compression for you

Raymond Chen

This is another trick along the lines of using DIB sections to perform bulk color mapping. GDI will do it for you; you just have to know how to ask. Today's mission is to take a 4bpp bitmap and compress it in BI_RLE4 format. Now, sure, there are programs out there which already do this conversion, but the lesson is in the journey, not in the dest...

Code
Apr 7, 2009
Post comments count0
Post likes count1

Clap and the filter graph claps with you

Raymond Chen

One of my colleagues was a fount of ideas, some of them crazy, some of them clever, and some of them both. I think this one counts as both. To render multimedia content with DirectShow, you build a so-called filter graph. A filter graph represents a series of transformations that are applied to data as it travels through the graph. For example, b...

History
Apr 6, 2009
Post comments count0
Post likes count1

There’s nothing wrong with making bold treeview items

Raymond Chen

Commenter Frans Bouma asks, Why is the text of a treenode chopped off when you switch the font from normal to bold? It apparently is for backwards compatibility but I fail to see why this is necessary for backward compatibility... Actually, bold treeview items work just fine. Watch: Start with our scratch program and make these changes: ...

Code
Apr 3, 2009
Post comments count0
Post likes count1

On the almost-feature of floppy insertion detection in Windows 95

Raymond Chen

Gosh, that floppy insertion article generated a lot of comments. First, to clarify the table: The table is trying to say that if you had a Style A floppy drive, then issuing the magic series of commands would return 1 if a floppy was present, or 0 if the floppy was not present. On the other hand, if you had a Style B floppy drive, the...

History
Apr 2, 2009
Post comments count0
Post likes count1

Windows 95 almost had floppy insertion detection but the training cost was prohibitive

Raymond Chen

One feature which Windows 95 almost had was floppy disk insertion detection. In other words, Windows 95 almost had the ability to detect when a floppy disk was present in the drive without spinning up the drive. The person responsible for Windows 95's 32-bit floppy driver studied the floppy drive hardware specification and spotted ...

History