Showing tag results for Other

Jul 8, 2005
Post comments count0
Post likes count0

How can I recover the dialog resource ID from a dialog window handle?

Raymond Chen

Occasionally, I see someone ask a question like the following. I have the handle to a dialog window. How can I get the original dialog resource ID that the dialog was created from? As we saw in our in-depth discussion of how dialogs are created from dialog templates, the dialog template itself is not saved anywhere. The purpose of a template ...

Other
Jun 29, 2005
Post comments count0
Post likes count0

Why isn't Windows Setup just a disk reimage plus a registry dump?

Raymond Chen

Why can't all the registry key needed by Windows Setup be precomputed and splorted at one go? One reason is that Windows Setup can be customized via a so-called "unattend file", which means that a lot of the work cannot be precalculated. Some settings also have cascade effects on other settings. Also, the model for component registration is to ma...

Other
Jun 28, 2005
Post comments count0
Post likes count0

Why do Microsoft code samples tend to use ZeroMemory instead of { 0 }?

Raymond Chen

If you go browsing around MSDN, you'll find that code samples tend to call explicitly rather than using "" notation. Why is that? To make it clearer for people who are used to other programming languages. Like it or not, a significant percentage of people who write programs for Windows do it in languages other than C and C++. Although those dev...

Other
Jun 22, 2005
Post comments count0
Post likes count0

I'll see (some of) you in Los Angeles in September

Raymond Chen

Jeremy Mazner has asked me to put together a 400-level session at this year's PDC. I came up with the title "Five(ish) things every Win32 developer should know (but likely doesn't)". Of course, now I have to think of five things! Here are some ideas I've been kicking around. Would you go to a talk that covered these topics? If not, what topic...

Other
Jun 21, 2005
Post comments count0
Post likes count0

Google is the cute two-year-old girl with curly blond hair that gets all the attention

Raymond Chen

Let's see, Google Maps adds the world outside the United States, Canada and the UK, and people go ga-ga. Nevermind that Google's new "maps" have nothing beyond country boundaries. "Aww, look at Google, she's so cute and adorable!" I'm sure the people at the existing online map services like MapQuest and MSN MapPoint are sitting there like older...

Other
Jun 17, 2005
Post comments count0
Post likes count0

Why do NTFS and Explorer disagree on filename sorting?

Raymond Chen

Some people have noticed that NTFS automatically sorts filenames, but does so in a manner different from Explorer. Why is that? For illustration purposes, I created files with the following names: And here's the sort order for various scenarios, at least on my machine. (You'll later see why it's important whose machine you test on.) First, not...

Other
Jun 9, 2005
Post comments count0
Post likes count0

Why can't the default drag/drop behavior be changed?

Raymond Chen

A common reaction to my explanation of whether dragging a file will result in a move or copy was that there should be a setting that lets you change the algorithm by which Explorer decides whether you want to move or copy. There are a few reasons why this is a bad idea. First, if there were such a setting, then it removes some of the predictabil...

Other
Jun 7, 2005
Post comments count0
Post likes count2

What if two programs did this?

Raymond Chen

Another thought experiment when thinking through a feature.

Other
Jun 2, 2005
Post comments count0
Post likes count0

If strncpy is so dangerous, why does Visual Studio 2005 still support it?

Raymond Chen

In response to the news that is so dangerous, at least one person has called for Visual Studio to revoke support for such a dangerous function, considering the continued support for the function grounds for holding the compiler manufacturer liable for any defects in programs compiled with that compiler. Well, for one thing, while it's true that...

Other
Jun 1, 2005
Post comments count0
Post likes count0

Using /LARGEADDRESSAWARE on 64-bit Windows for 32-bit programs

Raymond Chen

Probably the biggest advantage of 64-bit Windows is not the larger registers but rather the expansive 64-bit address space. Recall that even when the /3GB switch is set, 32-bit programs receive only 2GB of address space unless they indicate their willingness to cope with addresses above 2GB by passing the /LARGEADDRESSAWARE flag. This flag means t...

Other