A little wxWidgets demo

I’ve used wxWidgets back when it was wxWindows but haven’t played with it lately. So I loaded up Code::Blocks (with wxSmith) and wrote a little game. The premise is “concentration” but instead of cards, the game loads up random images from Google based on your choice of keywords. It isn’t perfect. The search sometimes returns strange things (just like any search) and if you get the same picture twice (unlikely but it happens) it can be confusing.

Anyway, for a quick throw together its not bad.

Since wxWidgets is cross platform, the game ought to run under Windows as well as Linux (where I developed it).

New Wine Dazzles Linux

I try to keep my Linux desktop updated pretty regularly via AdeptĀ  (although I know many people use Synaptic or Aptitude for the same purpose). So a few days ago I saw that Adept wanted to upgrade Wine to version 1.1.7.

Wine — if you don’t already know — is a port of the Windows API that runs under Linux. The purpose of it is to run Windows programs inside Linux. I can hear some people saying “Ugh — I don’t want to run Windows programs.” But the truth is there are many programs that run only on Windows that you might want to run or might have to run.

For example, I use Endicia for printing postage. The flat rate they charge suits me better than Stamps.com and the software — while not as friendly — is better suited for people who ship a lot of parcels (for example, you can use XML to transfer shipping information from another application). The problem is, of course, no Linux version.

Wine has been able to run Endicia’s Dazzle (which is sometimes called Envelope Manager; I don’t know why). But for some reason the postage bar code would print as a big black box. In addition, WINE won’t store your passphrase for Dazzle, but that’s a minor problem — you just have to enter your passphrase when you launch the program.

Once Wine installed 1.1.7 Dazzle was able to display and print bar codes! So it looks like Linux users can finally run Dazzle without resorting to VirtualBox (which is what I have been doing). The passphrase storage doesn’t work, so you do have to put your pass phrase in each time you start the program.

There seem to be some major improvement to Wine. Evernote portable now runs without crashing (or, at least, it crashes less frequently — it has always run but with some crashes). Other software I like to run with Wine includes SwitcherCAD (the free Spice software for electronic simulation) and the MPLAB tools from Microchip.

Use your PDA as a Monitor!

Sidewindow Settings Dialog

To me, buying a PDA is like casual dating. At first, I can’t wait for my new PDA to arrive. Then when I get it, I am sure that this is the one I’m going to keep using and its going to make my life simpler. Then in 2 or 3 months, I stop using it for most tasks and it becomes an expensive MP3/video player. Until I find a newer model.

I’ve gone through about half a dozen PDAs of varying power culminating with my current unit, a Dell Axim X50v. It sits under my desk charging, and since my GPS now plays videos and MP3, is rarely undocked. There is software at that allows you to use your device as a second (or third) monitor. That’s right — you can have a tiny little monitor on your desk when you aren’t using the PDA for something else. The software makes Windows use it just like any other monitor.

First of all, the whole idea is cool and the geek factor of having your Windows desktop extend onto your PDA is way high. However, I’d suggest you get the 14 day trail version (the full version costs about US$15.00). Because while the geek/cool factor is high, for me the usability factor was low.

The installation of the PDA software was straightforward — you don’t install anything on the PDA itself. However, I was surprised that the screen the Sidewindow driver emulates is always at 1280×1024. Of course, your PDA doesn’t have that kind of resolution (does it?) so the software emulates the screen size. You can then pick a viewing window from 768×1024 to 240×480. This means you either have a tiny view on giant windows or a reasonable view on tiny windows. You can switch to landscape if you have a way to dock the PDA so that it makes sense (you can also connect to the PDA via WiFi, so maybe dock isn’t the right word here, but have some way to put the PDA in a landscape orientation).

New Version of VirtualBox

is a great virtualization program similar to VMWare or VirtualPC except it is open source (and recently acquired by Sun, by the way). What’s cool about VirtualBox is that it has “additions” for the guest OS that really makes cursor and video management work well. For example, right now I have Kubuntu (the KDE version of Ubuntu) running on my right hand screen (full screen) watching a Youtube video. On the left I have my Windows host operating system. I can move the mouse between screens as though it was just one single computer (although I wish they’d integrate the Alt+Tab key combo — when you Alt+tab into Linux you get “stuck” until you use the mouse.

Youtube is sort of my standard test for virtualization. It won’t be as good as watching it on the host OS, but playing a flash video in a browser is a pretty good stress test for the audio and video virtualization. The new VirtualBox does just fine — even full screen works pretty good. Of course, VirtualBox also supports USB and serial device virtualizaton which is key for a lot of what I do. On the other hand, VirtualBox lacks some 64 bit support and doesn’t make good use of my multiprocessors (would love to dedicate one CPU to Linux).

Serial port via Internet

Com0Com setup screen

Have you ever had a serial device you wanted to use over the Internet? Turns out its easy to do with com0com. This open source program lets you create a virtual serial port pair. You can use the pair to connect two programs that “think” they are both talking to a remote program over a serial port. You can also tunnel the end point over the network to a remote machine’s serial port. In addition, there are tools to let you do things like share a single serial port with multiple programs. This might be useful, for example, if you want to use a single RS232 GPS with several programs that expect direct connection to the GPS. It would also be useful for monitoring a serial connection.

explains how to use my favorite GP3 over the internet. The software running the GP3 runs on one computer and the GP3 is connected to a remote computer across the LAN or around the world.

Although the article uses a GP3, almost anything with a serial port could use the same technique. After all, the GP3 has no idea it might be connected remotely. This tool could “hack” a lot of RS232 devices and transform them into network devices.

Resource Editing for Visual Studio Express

Microsoft provides several “Visual Studio Express” tools for free download. These are slightly limited versions of their popular development tools for C++, C#, and Visual Basic.

I enjoy having these tools for free, and most of the missing features I don’t notice. Except for one: resource editing. If you want to add icons or menus to your C++ programs, you’ll have to manually munge up an RC file. Or do you?

I went looking for an open source resource editor. Of course, I could just break down and install my real copies of Visual C++ or even break out some other commercial resource editors I have, but I wanted a free solution to go along with the free Visual Studio Express product.

I looked pretty hard and I couldn’t find a single tool that did what I wanted. However, I did find two tools that together would do the job.

The first tool is the excellent

. What doesn’t this tool do? It will create menus, icons, dialogs, cursors, and everything else you can think of. Oh yeah, but while it will read RC files, I couldn’t find any way to make it save an RC file! It will, however, do a nice job saving to a binary res file.

Of course, you could just leave it at that and let Visual Studio include the .res file. So I guess you can just use one tool. But I wanted an RC file that I could easily manipulate — at least for strings and IDs.

That’s when I downloaded . This tool is made to load resources from just about anywhere. You can do certain things with those resources (although you can’t actually edit them). However, this tool will save a proper RC file.

So the steps are:

1. Use XN Resource Editor to create your resources
2. Save resources as a .RES file

3. Open the .RES file with Resource Hacker

4. Save as a .RC file
5. Add the RC file to your Visual Studio project.

You may have to touch up your RC file a little if you get any errors (for example, include winuser.h).

XN can read an RC file, so you can “round trip” by reading the file from step 4 into XN, making changes, and then repeating steps 2 through 4.



I’ve long been a fan of using virtualization to run Linux under Windows or Windows under Linux. I’ve even used virtualization to host Windows under Windows or Linux under Linux so I can change things around with impunity or test something with an “old” operating system. I’ve used VirtualPC, VMWare, and Parallels. InnoTek recently made their virtualization product open source. From their Web site:

Presently, VirtualBox runs on Windows and Linux 32-bit hosts and supports a large number of including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and 2.6), and OpenBSD.

Here’s the link:

Alternative to Spy++

I used to use the full blown Microsoft developers tools, but lately I’ve been using the express versions along with some open source development tools. In general, I don’t miss much about the Microsoft compiler. But I have to admit that I miss some of the tools.

A few weeks ago, I started getting a mysterious error message on my computer. It was a dialog box complaining about the flash installation. There was no hint of which program was complaining though. I thought about running Spy++ — the Microsoft utility for looking at on screen Windows — and realized this computer doesn’t have a full load of Visual C++!

What I did find is . This is like a souped up version of Spy++ and its free. Winspector can show hidden windows or not. It can filter and buffer messages. It can watch messages to a window class from the Window’s creation. In short, it does everything Spy++ does plus more.

So, what was the offending program? , my Star Trek screen saver. Reinstalling it did the trick. I guess a recent flash upgrade broke it. Should have realized my screen saver wasn’t running. If you are a Star Trek fan (or even a science fiction fan) you really ought to download this free screen saver. It is quite the conversation piece.

Windows Gets the Emacs Religion

You know, for some of us Emacs isn’t a program — its the guiding force in life (well, maybe I’m going a little overboard… then again, ).

The problem with getting those Emacs commands ingrained in your head (or your fingers) is that you then have to use other programs! It is very painful to use Word or an IDE without those Emacs keystrokes.

I’m writing this on a Windows box using Firefox in a Blogger HTML editor. But guess what? Control+A takes me to the start of the line, Control+W cuts, and Control+Y pastes! Why? I’m running xkeymacs, a nice free program that lets you map Emacs keystrokes for Windows applications.

It does take a little work to get everything just right. For example, I added ^X-0 (zero) to send Firefox a Control+W which closes the current tab. ^X-2 can create a new tab. It is a little tricky to add new things (but not too bad, you just have to edit a text file with a lisp-like syntax). You also need to set it up so each program has its own settings (which means you can disable it for certain programs, or change Control+W to send escape (for Thunderbird, for example).

You can find xkeymacs here:

If you prefer just “fixing” Office applications, you might try:

Oh, and if you don’t think Emacs is powerful enough, here’s some food for thought:

Free Software — Plenty of It

I was reading a post on another ham radio blog about free software. It occurred to me that a lot of people probably aren’t aware of the project. This single disk image has favorites like OpenOffice, Firefox, Thunderbird, and the GIMP. But it also has programs like Audacity, NVU, and plenty more. On top of that, the CD acts as a live Linux disc, so you can boot Linux or install your favorites on Windows, depending on your mood.

Good stuff!