Showing results for 2005 - Page 37 of 40 - The Old New Thing

Feb 11, 2005
Post comments count0
Post likes count1

Windowless controls are not magic

Raymond Chen
Raymond Chen

It seems that when people notice that the Internet Explorer rendering engine doesn't use HWNDs for screen elements, they think that Internet Explorer is somehow "cheating" and doing something "undocumented" and has an "unfair advantage". Nevermind that windowless controls have been around since 1996. They aren't magic. Mind you, they're a lot of ...

Other
Feb 10, 2005
Post comments count0
Post likes count0

Why do minimized windows have an apparent size of 160×31?

Raymond Chen
Raymond Chen

We discussed a few months ago the issue of where windows minimized to before the taskbar was invented. In the modern taskbar world, why do minimized windows have an apparent size of 160x31? The size isn't just apparent. That's really their size. You can see them, for example, if you fire up a program that uses the Multiple Document Interface. ...

History
Feb 9, 2005
Post comments count0
Post likes count0

The dangers of filtering window messages

Raymond Chen
Raymond Chen

The and functions allow you to pass a filter, restricting the window handle or range of messages that the function will retrieve from the message queue. While it's okay to use these filters, make sure you eventually get around to making an unfiltered call so that any straggling messages can come through. A common mistake is to use a window-fil...

Code
Feb 8, 2005
Post comments count0
Post likes count0

What other effects does DS_SHELLFONT have on property sheet pages?

Raymond Chen
Raymond Chen

Once you invent a new flag you can start using it to fix errors of the past without breaking backwards compatibility. One of the errors of the past was that property sheet page dimensions were taken relative to the "MS Sans Serif" font, even if the page used some other font. This sample dialog template says that it is 212dlu wide and 188dlu t...

CodeHistory
Feb 7, 2005
Post comments count0
Post likes count0

Why does DS_SHELLFONT = DS_FIXEDSYS | DS_SETFONT?

Raymond Chen
Raymond Chen

You may have noticed that the numerical value of the flag is equal to . Surely that isn't a coincidence. The value of the flag was chosen so that older operating systems (Windows 95, 98, NT 4) would accept the flag while nevertheless ignoring it. This allowed people to write a single program that got the "Windows 2000" look w...

History
Feb 4, 2005
Post comments count0
Post likes count0

What's the deal with the DS_SHELLFONT flag?

Raymond Chen
Raymond Chen

It indicates that you want the Windows 2000 default shell font. But that doesn't mean that you're going to get it. In order to indicate that you would like the "Windows 2000" look for your dialog, you have to do three things and hope for a fourth: If all four conditions are satisfied, then your dialog gets the "Windows 2000" loo...

Code
Feb 3, 2005
Post comments count0
Post likes count0

Why is breadth-first searching better for file system tree walking?

Raymond Chen
Raymond Chen

Earlier, Eric Lippert discussed one scenario where breadth-first searching is better than depth-first searching. Today, I'll tell you about another. If you go back to the old MS-DOS file enumeration functions, you'll find that there is a "Find first file" function and a "Find next file" function, but no "Find close" function. That's because the ...

History
Feb 2, 2005
Post comments count0
Post likes count1

The history of the Windows PowerToys

Raymond Chen
Raymond Chen

During the development of Windows 95, as with the development of any project, the people working on the project write side programs to test the features they are adding or to prototype a feature. After Windows 95 shipped, some of those programs were collected into the first edition of the Windows 95 Power Toys. As I recall, the fir...

History
Feb 1, 2005
Post comments count0
Post likes count0

How to detect programmatically whether you are running on 64-bit Windows

Raymond Chen
Raymond Chen

To detect programmatically whether your 32-bit program is running on 64-bit Windows, you can use the IsWow64Process function. Do not do as some people do and hard-code the list of 64-bit processors. You'd think that after the hard-coded list of 64-bit processors changed the first time (when x64 was added to ia64), people would have learned thei...

Code