Windows
Block Windows Shut Down
by Bob on 28 January 2010, under Hacks, How To, Why Sys Admins Hate Me, Win32 & MFC, Windows
It’s hard to describe just how much I HATE rebooting my computer. If I have to use a Windows computer for any extended period of time, then I always change update policies to disallow automatic reboots. In fact, I usually click the irritating “Remind me in ten minutes” button every ten minutes for three weeks before I finally allow Windows to restart (or until I stop the Automatic Updates service).
So you can imagine how annoyed I was to come into work twice this week to the blue Windows logon screen. Every time this happens it takes me twenty minutes to figure out what I was doing the day before, what I have to do today, and where I stopped with my work. And really what made this so much more painful was that it happened without any advanced warning.
(continue reading…)Remove Tabs From the Windows Taskbar
by Bob on 6 June 2009, under COM, Hacks, Win32 & MFC, Windows
I’m very picky about my desktop environment. I like windows, toolbars, icons, etc. to be arranged in a certain way. Typically, I turn off annoying prompts and nag screens in Windows, and unhide “scary” advanced options in OS X. One hard-to-fix pet peeve is when applications put an icon in the notification area (near the clock) AND leave a tab in the taskbar. This wastes valuable taskbar real estate.
I use Spark on my workstation to connect to the company’s internal IM server. The application works alright, but the contacts window always appears in the taskbar. So I started to think about ways I could programmatically solve my problem.
(continue reading…)Dipping Duck
by Bob on 12 May 2009, under Hacks, Security, Why Sys Admins Hate Me, Win32 & MFC, Windows
So I was trying to read a document on my computer at work today, while making notes on a piece of paper. But every five minutes the screensaver would activate, causing me to stop writing, type my password, and find my place in the document again. Needless to say it was quite annoying.

Custom Draw ListView with Double Buffering
by Bob on 30 May 2008, under .NET, C++/CLI, How To, Win32 & MFC, Windows
For one of my pet projects, I needed to add a graphic to certain ListView rows. I considered owner-drawing the control, but that seemed messy. What I really wanted was a way to draw on top of whatever Windows painted. I couldn’t find a nifty .NET way to do this, so remembering a technique from the MFC days, I decided to custom draw the ListView. This would let me inject my own drawing code and let Windows handle the rest. Perfect!
I had originally implemented the ListView using a control style to eliminate the annoying flicker every time the list was repainted. Once I started custom drawing the control, I saw odd artifacts in the ListView’s client area when I scrolled or moved the mouse. If I turned off double buffering, it worked fine.
(continue reading…)Vista: Defective By Design
by Bob on 27 April 2008, under Vista, Windows
After ten months, I’ve had a reasonably pleasant experience with Windows Vista. But I recently had a series of problems that really made me consider switching back to Linux on my desktop.
I came home from work Monday to find that my computer had restarted after seventy-two days uptime. I had been in the middle of a project the night before so I already wasn’t happy when I sat down. I tried to launch the Event Viewer to see what had caused the reboot, but got this error:
“Windows cannot access the specified device, path, or file. You may not have appropriate permissions to access the item.”
Now, I’m running as a least-privileged administrator with UAC enabled. I was never prompted to elevate. In fact, forcing it to elevate did nothing. And because the local administrator account is disabled, by default, I was out of luck. (continue reading…)