Creating custom tasks on a jump list

Today’s Little Program adds a custom task to the application’s jump list. Take the scratch program and make the following changes. (Remember, Little Programs do very little error checking because that’s how they roll.) #include <shlobj.h> #include <propkey.h> #include <wrl/client.h> using namespace Microsoft::WRL; ComPtr<IShellLink> CreateShellLinkForTask( PCWSTR pszTitle, PCTSTR pszArgs, int idIcon) { ComPtr<IShellLink> spsl; CoCreateInstance(CLSID_ShellLink,…

2

Wouldn’t the Recycle Bin sample program have been simpler without COM?

Steve Wolf suggests that the sample program would have been much simpler had the shell extension model been a flat Win32 interface. Okay, let’s try it. Since this is an extension model, each extension needs to specify the callbacks for each namespace operation. Perhaps it could have been done like this: HRESULT (CALLBACK *SHELLFOLDER_EXTENDHANDLER)( void…

17

How do I display an RTL string in a notification balloon on an LTR system?

Suppose you have a program that is written in Arabic or Hebrew and you want to render some text. No problem. You just call Ext­Text­Out and pass the ETO_RTL­READING flag to say, “Please render this string in an RTL context.” Many other text-rendering functions have a similar flag, such as DT_RTL­READING for Draw­Text. But what…

8

Whether your application should display its content in RTL should be based on the content

A customer had the following puzzle: We have a small bootstrapper application that consists of a dialog box and a few message boxes. The problem is that we want our application to work properly on Arabic and Hebrew systems, and we can’t come up with a good way to determine text direction of the underlying…

15

Tales from "The Box": A survey of crackpots in physics

David Dixon, assistant professor of physics at Saddleback College, gave a presentation while he was at California Polytechnic State University titled Tales from “The Box”, in which he presents selected contents of The Box, an archive of what is charitably describe as “unsolicited materials”, but which is in more plain language “stuff sent to us…

11

Why doesn’t the New Folder command work in the root of a redirected drive resource in a Remote Desktop session?

When you connect to another computer via Remote Desktop, you have the option of injecting your local drives into the remote computer, known as Device and Resource Redirection. These injected drives are available under the UNC \\tsclient\X where X is a drive letter on the local machine. The name TSCLIENT combines a bunch of internal…

27

That fee was so that we wouldn’t have to raise our prices

I dreamed that I got screwed by Ticketmaster. I was relieved when I woke up and found out it was only a dream. Bonus chatter: The economics of Ticketmaster. It reminds me of a company who added a service fee to an existing rate plan, and in their FAQ for the service fee, they explained,…

18

Disabling the PrtSc key by blocking input

A customer asked how to disable the PrtSc key in the On-Screen Keyboard. There is no way to disable the PrtSc key in the On-Screen Keyboard. The On-Screen Keyboard shows a keyboard, and you can click any virtual key you like. There is no policy to remove specific keys from the On-Screen Keyboard. But this…

12

How do you intercept taskbar notification balloons?

A customer wanted to know how they could monitor and intercept taskbar notification balloons. In particular, they wanted to intercept the clicks on a particular balloon and take alternative action. There is no supported mechanism for intercepting taskbar notification balloons or redirecting clicks on them. Imagine if that were possible: Fabrikam would intercept notification balloons…

15