The Old New Thing

Reading the output of a command into a batch file variable

It's Day Two of Batch File Week. Don't worry, it'll be over in a few days. There is no obvious way to read the output of a command into a batch file variable. In unix-style shells, this is done via backquoting. The Windows command processor does not have direct backquoting, but you can fake it by abusing the FOR command. Here's the ...
Comments are closed.0 1
Code

Raymond's subjective, unfair, and completely wrong impressions of the opening ceremonies of a major athletic event which took place recently

Like many other people, I watched the opening ceremonies of a major athletic event which took place a few days ago. (The organization responsible for the event has taken the step of blocking the mention of the name of the city hosting the event and the year the event takes place, or the name of the event itself except in editorial news ...

Why don't any commands work after I run my batch file? I'm told that they are not recognized as an internal or external command, operable program, or batch file.

I sort of forgot to celebrate CLR Week last year, so let's say that CLR week is "on hiatus" until next year. To fill the summertime time slot, I'm going to burn off a busted pilot: This week is Batch File Week 2012. Remember, nobody actually enjoys batch programming. It's just something you have to put up with in order to get something done. ...
Comments are closed.0 0
Code

Psychic debugging: Why your IContextMenu::InvokeCommand never gets called

A customer reported a problem with their shell context menu extension. I have implemented the IContext­Menu shell extension, but when the user selects my custom menu item, my IContext­Menu::Invoke­Command is never called. Can anyone please let me know what the problem could be and how to fix it? Since there really isn't much ...
Comments are closed.0 0
Code

A brief and also incomplete history of Windows localization

The process by which Windows has been localized has changed over the years. Back in the days of 16-bit Windows, Windows was developed with a single target language: English. Just English. After Windows was complete and masters were sent off to the factory for duplication, the development team handed the source code over to the localization ...

Taking flexitarianism to another, perhaps unintended, level

Our cafeteria has been trying to encourage flexitarianism, which it defines as eating one meat-free meal per week. But in their effort to make the concept more appealing, they may have lost sight of the goal. (The "Vegetarian Option" magnet was probably intended for the Asparagus, Mushroom and Spinach Pizette just above it.) One of my ...

What's the story behind the WM_SYNCPAINT message?

Danail wants to know the story behind the WM_SYNC­PAINT message. The documentation pretty much tells the story. When a window has been hidden, shown, moved or sized, the system may determine that it needs to send a WM_SYNC­PAINT message to the windows of other threads. This message must be passed to Def­Window­Proc, which ...

The format of icon resources

It's been a long time since my last entry in the continuing sporadic series on resources formats. Today we'll look at icons. Recall that an icon file consists of two parts, an icon directory (consisting of an icon directory header followed by a number of icon directory entries), and then the icon images themselves. When an icon is stored...

Why do some font names begin with an at-sign?

It was a simple question. For some reason, my font selection dialog (CFont­Dialog) shows a bunch of font names beginning with the at-sign (@). These fonts don't work correctly if I use them. Any idea what they are? (I tried searching the Internet, but search engines don't seem to let you search for @ so it's hard to make much headway...
Comments are closed.0 0
Code

Feedback usabilla icon