Quantcast
Channel: The Old New Thing
Browsing all 3085 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

If my window hosts multiple windowless ActiveX controls, which one do I call...

Commenter Farproc asks how one goes about hosting two windowless ActiveX controls in a single window. In particular, "none of the documentation explains how to choose which control to send...

View Article


Image may be NSFW.
Clik here to view.

Hazards of spelling autocorrection: defiance

On an internal mailing list, a colleague asked for some recommendations on a webcam. I was wondering if there are any models I should avoid or defiantly get. I got this mental image of my colleague...

View Article


Image may be NSFW.
Clik here to view.

What does a STATUS_OBJECT_TYPE_MISMATCH exception in LeaveCriticalSection mean?

It means the same thing as a STATUS_INVALID_HANDLE exception.

View Article

Image may be NSFW.
Clik here to view.

What happens if I call KillTimer with a NULL hwnd?

A customer discovered a bug in their code and wanted some information on how serious it was, so they could assess how urgently they need to issue a fix. We have code that calls Set­Timer with a valid...

View Article

Image may be NSFW.
Clik here to view.

How do I prefetch data into my memory-mapped file?

A customer created a memory mapping on a large file and found that when the memory manager wanted to page in data from that file, it did so in 32KB chunks. The customer wanted to know if there was a...

View Article


Image may be NSFW.
Clik here to view.

The time I watched a total lunar eclipse from the top of a mountain

One of my colleagues loves doing outdoorsy things, and he also loves space and astronomy. Many years ago, he invited a small number of us on an outing that combined both of his interests: A hike up a...

View Article

Image may be NSFW.
Clik here to view.

Why does PrintWindow hate CS_PARENTDC? Because EVERYBODY hates CS_PARENTDC!

Commenter kero wants to know why the Print­Window function hates CS_PARENT­DC. (And CS_CLASS­DC, and CS_OWN­DC.) Because everybody hates CS_PARENT­DC! (And CS_CLASS­DC, and CS_OWN­DC.) We saw earlier...

View Article

Image may be NSFW.
Clik here to view.

Microspeak: Turds

In Microspeak, a turd is a graphics glitch which results in old pixels appearing on the screen when they shouldn't. Perhaps they are not being erased properly, or instead of being erased, they move to...

View Article


Image may be NSFW.
Clik here to view.

Don't be helpless: What might be the reason for a "Path not found" error?

Internally at Microsoft, we have a programmer's tool which I will call Program Q. On the peer-to-peer mailing list for Program Q, somebody asked the following question: When I try to do a q edit...

View Article


Image may be NSFW.
Clik here to view.

Eventually the window manager simply says that enough is enough

Many window manager operations are recursive, and eventually the window manager will simply say that enough is enough when the recursion goes too deep. We've seen this when you nest windows more than...

View Article

Image may be NSFW.
Clik here to view.

How can I determine the underlying cause of a EXCEPTION_IN_PAGE_ERROR exception?

A customer was using memory-mapped files and installed an exception handler to log in-page errors in the memory-mapped file region. They wanted to know how they could obtain the real disk error that...

View Article

Image may be NSFW.
Clik here to view.

Why do you have to wait for Windows Error Reporting to check for solutions...

Leo Davidson wonders why you have to wait for Windows Error Reporting to check for solutions before it restarts the application. Why not do the two in parallel? Well, for one thing, when the...

View Article

Image may be NSFW.
Clik here to view.

Fabio coming to Redmond. Also: Whey Protein

Mark your calendars: Fabio Lanzoni, better known to the world as simply Fabio, will be at the Redmond Whole Foods Market on June 21 to promote his whey protein product. (Now made with real Fabio!) And...

View Article


Image may be NSFW.
Clik here to view.

Microsoft Dynamics in a soda can, sort of

It is not uncommon for a product team to produce some custom soda cans (really, carbonated water) for distribution at Microsoft cafeterias. Last year, the Microsoft Dynamics™ CRM 2011 team put some...

View Article

Image may be NSFW.
Clik here to view.

Why don't all of my folder customizations roam with my profile?

A customer reported some inconsistency in how folder customizations are handled by roaming profiles. Log onto Server1 with a roaming profile. Open the following folders and in each one, customize the...

View Article


Image may be NSFW.
Clik here to view.

Now that Windows makes it harder for your program to block shutdown, how do...

Up until Windows XP, applications could intercept the WM_QUERY­END­SESSION message and tell Windows, "No, don't shut down." If they were polite about it, they would also inform the user which...

View Article

Image may be NSFW.
Clik here to view.

Globalization quiz: In honor of, well, that's part of the quiz

The Corporate Citizenship Tools; Microsoft Local Language Program Web site contains a map of the world, coded by region. There was a bug on the map. See if you can spot it:   Asia   Europe   Middle...

View Article


Image may be NSFW.
Clik here to view.

What is the history of the GetRandomRgn function?

An anonymous commenter was curious about how the Get­Random­Rgn function arrived at its strange name, what the purpose of the third parameter is, and why it is inconsistent between Windows 95 and...

View Article

Image may be NSFW.
Clik here to view.

It's not a good idea to give multiple controls on a dialog box the same ID

When you build a dialog, either from a template or by explicitly calling Create­Window, one of the pieces of information about each control is a child window identifier. And it's probably in your best...

View Article

Image may be NSFW.
Clik here to view.

When embedding a dialog inside another, make sure you don't accidentally...

The WS_EX_CONTROL­PARENT extended style (known in dialog templates as DS_CONTROL) instructs the dialog manager that the dialog's children should be promoted into the dialog's parent. This is easier to...

View Article
Browsing all 3085 articles
Browse latest View live