Showing archive results for 2013

Sep 27, 2013
Post comments count0
Post likes count1

How can I determine how responsive my application is to input?

Raymond Chen

A customer was adding diagnostics to their application and wanted to know if there was a way to detect that the application was being slow in processing its input. These sorts of delays manifest themselves to the end user as a sluggish application which is slow to respond to input events. They already had a watchdog timer that was reset every time...

Code
Sep 26, 2013
Post comments count0
Post likes count1

Don't forget, Unicode includes formatting characters which can be used to influence output formatting

Raymond Chen

Consider this simple function: Depending on your screen resolution and font choices, this may end up displaying like this: That line break was awfully unfortunate, stranding the number 2 on a line by itself. (In publishingspeak, this is known as a orphan.) You can't control where the function will insert line breaks, but you can try to i...

Code
Sep 25, 2013
Post comments count0
Post likes count1

How can I tell that somebody used the MAKEINTRESOURCE macro to smuggle an integer inside a pointer?

Raymond Chen

Many functions and interfaces provide the option of passing either a string or an integer. The parameter is formally declared as a string, and if you want to pass an integer, you smuggle the integer inside a pointer by using the macro. For example, the function lets you load an resource specified by integer identifier by passing the identifier in...

Code
Sep 24, 2013
Post comments count0
Post likes count1

Punctuation is becoming increasingly decorative and less functional

Raymond Chen

The "Blog" of "Unnecessary" Quotation Marks calls out abuse of the quotation mark. For some reason, quotation marks are being increasingly used as a form of emphasis (a usage which remains controversial), by people unaware that such use, when interpreted as scare quotes, serves to undermine their original point. Mind you, the emphasis theory do...

Non-Computer
Sep 24, 2013
Post comments count0
Post likes count1

Wait, so does moving a file recalculate inherited permissions or doesn't it?

Raymond Chen

A customer had a question about whether moving a file recalculated inherited permissions. They found that on their Windows Server 2008 R2 machine, if they moved a file between directories with different inheritable ACEs, then the security descriptor is recalculated to match the destination folder, if they perform the move from the machine itse...

Tips/Support
Sep 23, 2013
Post comments count0
Post likes count1

I dreamed that I was in an alternate-universe Samuel L. Jackson movie

Raymond Chen

I dreamed that I was part of the crew of an underwater spaceship, and we had to deal with an alligator that got on board. How the alligator got on board was never explained, but now is not the time to ask questions because, you know, alligator. The plan was to flood the ship and wash the alligator out. There were only enough air pills for the fema...

Non-ComputerDream
Sep 23, 2013
Post comments count0
Post likes count1

Providing a custom autocomplete source for an edit control

Raymond Chen

Today's Little Program shows a custom source for autocomplete. It's nothing exciting, but at least's it's something you can use as a starting point for your own customizations. We start with a dialog template, whose edit control will be the target of a custom autocomplete. Just for fun, I wrote the program in ATL. Instead of complaining that ...

Code
Sep 20, 2013
Post comments count0
Post likes count1

How can I tell that I have a shell folder that represents My Computer?

Raymond Chen

You have in your hands an , and you want to know whether this is an that represents My Computer. There are a few ideas that may occur to you. One is to ask the folder for its current location and compare it to . Okay, we have a lot of moving parts here. Let's look at them one at a time. The function takes an object and asks what folder it r...

Code
Sep 19, 2013
Post comments count0
Post likes count0

Raymond's subjective, biased, unfair, and completely wrong characterization of the sounds of several East Asian (and one Southeast Asian) languages

Raymond Chen

Hokkien: This is the language I learned first, so to me it sounds perfectly normal and is in fact how languages should sound. I find it odd that people describe it as one of the more difficult languages to learn. I mean, sure it has a large tone repertoire (eight theoretical, though only seven in practice) and extensive tone sandhi, but that's what...

Non-Computer
Sep 19, 2013
Post comments count0
Post likes count1

When a program is launched via DDE, and there are multiple servers, which one is used?

Raymond Chen

Although you are more than welcome to stop using DDE (please oh please stop using it), there are still many applications which still use it (cough), and as a result, customers still have questions about it. One customer wanted to know why, if multiple copies of a DDE-based application are running, Windows 7 will send the command to the earli...

Code