The Old New Thing

How do I limit the size of the preview window used by Aero Snap?

A customer reported that the translucent preview shows by Aero Snap showed the wrong dimensions for their application window. "As you can see in the screen shot, the preview is too wide. Our application window has a maximum width, but the preview is fully half the width of the screen. How can we disable the Aero Snap feature?" Whoa there, ...
Comments are closed.0 0
Code

What appears superficially to be a line is actually just a one-dimensional mob

In China, queueing is honored more in the breach than in the observance. If you see a line for something, you must understand that what you are seeing is not really a line. It is a one-dimensional mob. You must be prepared to defend your position in line fiercely, because any sign of weakness will be pounced upon, and the next thing you know, ...

We've traced the call and it's coming from inside the house: Grid lines in list view report mode

A customer wanted to know how to remove the grid lines from a list view control in report mode. The customer was kind enough to include the source code for the relevant part of the program and drew our attention to the line in the resource file that he believed to be the source of the problem: CONTROL "",IDC_LIST,WC_LISTVIEW,LVS_REPORT|...
Comments are closed.0 0
Code

Kindergarten writing exercise from my niece

When my niece was in kindergarten, a regular classroom assignment was for students to write a few sentences about something happening in their lives. For one of the assignments, my niece wrote the following: My auntie has a baby in her tumy. If it is a boy I will call him Kevin. If it is a grl I will call her Alula. We have no idea where ...

It rather involved being on the other side of this airtight hatchway: Invalid parameters from one security level crashing code at the same security level

In the category of dubious security vulnerability, I submit the following (paraphrased) report: I have discovered that if you call the XYZ function (whose first parameter is supposed to be a pointer to a IUnknown), and instead of passing a valid COM object pointer, you pass a pointer to a random hunk of data, you can trigger an access ...

Creative naming in pursuit of subverting the no-fun zone

For a time, the Information Technology department at Microsoft cracked down on what it believed to be frivolous mailing lists. All mailing lists inside the company had to have a valid business purpose. The nascent wireless networking team found a way to circumvent this rule: They created a mailing list for discussion of non-business topics ...

TrackMouseEvent tracks mouse events in your window, but only if the events belong to your window

Greg Williams wonders why Track­Mouse­Event fails to detect mouse hover events when responding to Do­Drag­Drop callbacks. "My suspicion is that Do­Drag­Drop monopolizes the window so that a WM_MOUSEHOVER message is never posted, so it won't end up being useful." That's basically it, for the appropriate sense of the ...
Comments are closed.0 0
Code

The alignment declaration specifier is in bytes, not bits

Explicit object alignment is not something most people worry about when writing code, which means that when you decide to worry about it, you may be a bit rusty on how the declarations work. (After all, if it's something you worried about all the time, then you wouldn't have trouble remembering how to do it!) I was looking at some customer ...
Comments are closed.0 0
Code

I will be speaking at TechEd China 2010 today

As I've mentioned a few times by now, the way to get me to show up at your event is to invite me. The easiest (i.e. cheapest) way is to hold your event in the Seattle area so that my travel expenses are effectively zero; I just use my bus pass. The folks at TechEd China 2010, on the other hand, had to fly me all the way out to Beijing, which ...