If you make a single-instance program, and somebody runs a second copy of the program and passes a command line, the most common way of handling this is to hand the command line to the first copy of the program and let the first copy deal with it. When you do this, don't forget about the current directory. If somebody passes a relative path
A few random links that I've collected. And then the obligatory plug for my column in TechNet Magazine:
I was filling out an online form, and it gave me the option of providing feedback on the service I had received. The button was marked "optional", but I clicked it anyway because there were one or two things I thought were worthy of mentioning, suggestions on how they could improve the user's experience with the Web site, that sort of thing.
A few weeks ago, I got a piece of email from a friend. Maintenance crew in cockpit. They just told the pilot that the airplane "double faulted."
A customer wanted to alter the behavior of a multi-line edit control so that it did not treat a press of the Tab key as a request to insert a tab character but rather treated it as a normal dialog navigation key. The approach the customer took was to subclass the edit control and intercept the Tab key: There are many things wrong with this
Brain Hayes, author of Infrastructure: A Field Guide to the Industrial Landscape (another example of the "short: long" book title fad), talks us through all of the wires hanging from what we commonly call a "telephone pole".
From a purely theoretical point of view, there is only one "want" code you really need: DLGC_WANTMESSAGE. All the others are just conveniences. For example, returning DLGC_WANTARROWS means "I want this message if it is an arrow key; otherwise, I don't care." It lets you write instead of the more cumbersome (but equivalent) Similarly, DL
Columnist Wm. Steven Humphrey expounds on Why the Fantastic 4 Human Torch ATV (with Light-Up Headlights!) is the Worst Movie Tie-In Toy Ever. (Readers cautioned for strong language, but it's funny because it's true.)
IsBadXxxPtr is a bad idea and you shouldn't call it. In the comments, many people proposed changes to the function to improve the implementation. But what's the point? IsBadXxxPtr is just a bad idea. There's no point improving the implementation of a bad idea. On the other hand, some people suggested making it clear that IsBadXxxPtr is a b
Perhaps you've seen this quote attributed to Albert Einstein: As a young man, my fondest dream was to become a geographer. However, while working in the Customs Office, I thought deeply about the matter and concluded that it was far too difficult a subject. With some reluctance, I then turned to physics as an alternative. Well, it's a fake.