The TEMP directory is like a public hot tub whose water hasn’t been changed in over a year

A customer reported that they couldn’t install product X. When they ran the installer, the got the error message setup.exe – Application Error  The application was unable to start correctly (0xc00000ba). Click OK to close the application. OK The product X setup team weren’t sure what to make of this, and they asked if anybody had…


Keyboard shortcut for resizing all columns in a listview control to fit

The keyboard shortcut for resizing all columns in a report-mode (also known as Details mode) list view control to fit the current content width is Ctrl+Num+. That’s the + key on the numeric keypad. (If you’re using Explorer, you can also right-click the column header and choose Size All Columns to Fit.) Note that this…


You can’t use the WM_USER message in a dialog box

Today, I’m not actually going to say anything new. I’m just going to collate information I’ve already written under a better title to improve search engine optimization. A customer reported that they did the following but found that it didn’t work: #define MDM_SETITEMCOUNT WM_USER INT_PTR CALLBACK MyDlgProc(HWND hdlg, UINT wm, WPARAM wParam, LPARAM lParam) {…


Diversion: Generating a random color from JavaScript

A colleague posed a little puzzle for a fun little app he was writing in HTML: He wanted to generate a random color. If you search around the intertubes, you can find several possible attempts at a solution, like this collection, and an interesting example that has trouble with the pigeonhole principle. The original function…


How do you come up with new shortcut keys?

Anon asks, “How do you come up with new shortcut keys and how do you deal with different keyboard layouts? What is the process; is there a company-wide procedure to keep things consistent?” This is several questions (none of them really a suggestion, but I’ve given up on making the Suggestion Box about suggestions; now…


Using WM_COPYDATA to marshal message parameters since the window manager otherwise doesn’t know how

Miral asks for the recommended way of passing messages across processes if they require custom marshaling. There is no one recommended way of doing the custom marshaling, although some are hackier than others. Probably the most architecturally beautiful way of doing it is to use a mechanism that does perform automatic marshaling, like COM and…