How do I get the effect of CW_USEDEFAULT positioning on a window I've already...
A customer wanted to know how to get the effect of CW_USEDEFAULT positioning on a window that already exists. In particular, they wanted to be able to reposition a dialog box to get the...
View ArticleExtracting GPS coordinates from a photo and plotting it on a map
Today's Little Program extracts GPS coordinates from a photo and plots it on a map. Remember, Little Programs do little to no error checking, because that's how they roll. #define STRICT #define...
View ArticleMy friend lived in an apartment inside a museum
One evening, I had a series of three dreams. In each one, I visited an unusual home. In the second dream, I visited the home of a friend of mine. She lived in a modern luxury apartment inside an art...
View ArticleWhy did Raymond bring a knitting bag to every meeting?
I stopped knitting a few years ago, but back when I knitted regularly, I tended to bring my knitting bag with me everywhere I went. There are a lot of idle minutes in your typical day. Waiting for the...
View ArticleThe case of the DLL that refuses to load
A customer reported that they had a problem that occurred only on some machines but not others. Their application called HINSTANCE hinst = LoadLibraryEx(strModule, LOAD_WITH_ALTERED_SEARCH_PATH); and...
View ArticleIf you try to declare a variadic function with an incompatible calling...
Consider the following function on an x86 system: void __stdcall something(char *, ...); The function declares itself as __stdcall, which is a callee-clean convention. But a variadic function cannot...
View ArticleThings that can happen when your kitchen gets taken over by others
Today is the Thanksgiving holiday in the United States, one of the the major holidays for family get-togethers. (Another big one is Christmas.) One year, it was our family's turn to host Thanksgiving,...
View ArticleWhy can't I create my dialog with DialogBox, DialogBoxParam, CreateDialog,...
One of the purposes of my dialog manager series was to help people diagnose problems with their dialog boxes. But since I embedded the tips inside the series body, it's hard for people to find them,...
View ArticleNotes on gift card and gift certificates in the state of Washington
Today is the unofficial start of the holiday shopping season. One of my colleagues read the find print of a gift card he received: A monthly maintenance fee of $3 applies but is waived for the first...
View ArticleLogging the foreground process as it changes
Today's Little Program simply logs all changes to the foreground window by recording the path to the application the user switched to. You might use this as part of a usability study to monitor what...
View ArticleThe walls of my friend's house sometimes randomly got corrupted
One evening, I had a series of three dreams. In each one, I visited an unusual home. In the third dream, I visited the home of a friend of mine. He lived in a white stucco split-level, a stereotypical...
View ArticleHow do I configure the timeout used by UI0Detect (Interactive Services...
Windows Vista introduced Session 0 Isolation which enforces the rule that services should not display UI. If a service tries to display UI, another service known as the Interactive Services Detection...
View ArticleSir, is this your high-speed ferry?
The Victoria Clipper is a high-speed ferry that runs primarily between Seattle and Vancouver, BC. Early Sunday morning, a man scaled a fence and drove off with one of the boats. The issue was resolved...
View ArticleWhat's the difference between the wParam of the WM_NOTIFY message and the...
The WM_NOTIFY message takes the following parameters: wParam = identifier of the control sending the message lParam = pointer to a NMHDR structure hwndFrom = handle of the control sending the message...
View ArticleWhat's up with the registry key HKEY_CLASSES_ROOT\CLSID\CLSID?
While I was looking for spelling errors in the registry, I ran across the strange registry key HKEY_CLASSES_ROOT\CLSID\CLSID, which has as its default value the stringified GUID...
View ArticleIs it wrong to call SHFileOperation from a service?
A customer had a simple question: "Is it wrong to call SHFileOperation from a service?" I don't know if I'd call it wrong, but I'd call it highly inadvisable. SHFileOperation was designed for...
View ArticleDestroying all child processes (and grandchildren) when the parent exits
Today's Little Program launches a child process and then just hangs around. If you terminate the parent process, then all the children (and grandchildren and great-grandchildren, you get the idea) are...
View ArticleThis was only a test; if this had been an actual concert...
I dreamed that there was a fire in Benaroya Hall during a concert. The flames swirled overhead up by the ceiling. The exit doors had been blocked by security, so people flowed from door to door...
View ArticleMysterious email, possible social engineering, whatever it was, it didn't work
A colleague of mine got a strange piece of email. It went something like this, although I've substituted a fictitious nation and fictitious company name to protect the guilty(?). Subject: St. George's...
View ArticleSome vice presidents forget that not everybody attends the same meetings that...
There are some vice presidents who forget that not everybody attends the same meetings that they do. When they send email to the entire division, they use buzzwords and acronyms that are not...
View Article