We know your job is hard, you don't have to show us
Some years ago, I attended a internal presentation where one group was teaching another group how to use their new feature. This particular feature was a "Just plug in the things you want, click the...
View ArticleIf the cursor clip rectangle is a global resource, how come I can't change it...
A customer reported that the ClipCursor function was not working. "The cursor clip rectangle is a shared global resource, so I should be able to change it any time I like. My app installs a global...
View ArticleWhat happened in real-mode Windows when somebody did a longjmp into a...
During the discussion of how real-mode Windows handled return addresses into discarded segments, Gabe wondered, "What happens when somebody does a longjmp into a discardable segment?" I'm going to...
View ArticleHow do I obtain the computer manufacturer's name via C++?
The way to get the computer manufacturer and other information is to ask WMI. WMI is much easier to use via scripting, but maybe you want to do it from C++. Fortunately, MSDN takes you through it step...
View ArticleExcuses college students use for missing assignments
My father recently retired after over 40 years as a college professor. During that time, he has seen all sorts of lame excuses students offer for missing homework assignments. Eventually, he got tired...
View ArticleThe case of the mysterious Alternate Data Stream query
A customer was running Windows Server 2003 ("Still in support until 2015!") and they have some custom application that monitors all disk accesses. They noticed that there were a lot of failed...
View ArticleThe case of the missing context menu verbs
A customer reported that when they right-clicked a batch file, a bunch of commands were missing. For example, Open was gone! Okay, there really isn't much of a story here, because some direct...
View ArticleCan you dllexport/dllimport an inline function?
The MSDN documentation on the subject of Defining Inline C++ Functions with dllexport and dllimport was written with compiler-colored glasses. The statements are perfectly true, but they use...
View ArticleHow do I manually recalculate ACLs on a file based on the containing directory?
A customer wanted to move a file and have it forget all its old ACLs and instead inherit its ACLs from its new location. They found an old article of mine that said If you use SHFileOperation to...
View ArticleCreating a listview with checkboxes on some items but not others
Today's Little Program creates a listview with checkboxes on some items but not other. The LVS_EX_CHECKBOXES extended style is really just a convenience style. Everything it does you could have done...
View ArticleThe Dead Grandmother/Exam Syndrome
I draw your attention to this research paper from Professor Mike Adams from Eastern Connecticut State University titled The Dead Grandmother/Exam Syndrome, also published in The Annals of Improbable...
View ArticleHow do I hit the Win+PrintScreen hotkey if my tablet doesn't have a PrtSc key?
Windows 8 added a new hotkey: Win+PrtSc takes a snapshot of your screen and puts it into the Screenshots folder of your Pictures library. But what if you are on a tablet with no PrtSc key? On tablets,...
View ArticleThere are so many things that call themselves message queues
There are a whole bunch of things in Windows that call themselves message queues, and none of them have anything to do with each other. There is the window manager message queue, which holds window...
View ArticleThe curse of the leading zero
Consider the following batch file which tries to decide whether we are in the first or second half of the calendar year. (Assume US-English locale settings.) if %DATE:~4,2% LEQ 6 ( echo First half )...
View ArticlePsychic debugging: Why messages aren't getting processed by your message pump
The second parameter to the GetMessage is an optional window handle that is used to tell the GetMessage function to retrieve only messages that belong to the specified window. A filtered GetMessage...
View ArticleHow do I get a high resolution icon for a file?
Today's Little Program obtains a high resolution icon for a file. Start with our scratch program and make these changes. Remember, Little Programs do little or no error checking. This week's smart...
View ArticleHello Kitty takes a rather inefficient trip to the United States
In the book Hello Kitty Takes a Trip, the title character travels to New York, Florida, Vermont, and Hawaii, in that order. Now, sure, the Traveling Salesman Problem is NP-hard, but you're not even...
View ArticleWhen the Web page says that a tool is not supported, it means that if you...
I file this under the category of People refuse to read what is right in front of them. There used to be a number of utilities available for download which all go by the name PowerToys. And they all...
View ArticleWhat clock do MSG.time and GetMessageTime use?
The MSG structure has a field called time which is a DWORD. There is also a function GetMessageTime which returns a LONG. Both are documented as returning the time the message was generated, but the...
View ArticleCommissioner Bud Selig was named the first recipient of the Commissioner Bud...
In what was sure to have been a stunning surprise, last night, the first annual Commissioner Bud Selig Leadership Award was given out. And the winner was... Allan H. "Bud" Selig! I wonder who will win...
View Article