Monday, February 05, 2007

wxWidgets under Vista

I've decided to (finally) test how do wxWidgets applications fare under Windows Vista. Installing Vista (in a VMware Workstation 6 Beta virtual machine under a Debian amd64 host) turned out to be more problematic than I thought as the MSDN disk 2429.5 contains exactly 4 ISO images of Vista CDs while the installer asked me to insert disk 5 and as I didn't have I couldn't continue with the installation. So I had to install the Enterprise Edition from the disk 2430.2 which not only comes with 4 CD images on the DVD but also actually installs from them.

Other than that, installation was pretty uneventful and un-wow: the installer warns that the computer must reboot several times during the installation -- and so it does. Why no other system among those I installed (various Linux distributions, FreeBSD, Mac OS X, ...) needs to reboot even once? Anyhow, UI-wise the only useful information from the installer is that Vista seems to use ./../... animation as an indeterminate progress control (OS X, or Firefox which probably copied it from it, use a small spinning wheel for the same thing) so if we ever implement a separate control for this, we know how it should look under Windows now.

After finishing the installation and getting rid of half a dozen of the icons in the taskbar notification area (this is progress, I think XP had only a couple of them) I could finally run the widgets sample. The only problem I could see with it was with wxNotebook tabs on the left or right: this doesn't work at all under Vista and I think we should just abandon trying to make it work as it already was pretty buggy under XP.

But there are a few enhancements we could implement, of course:

  • wxSearchCtrl doesn't look native but Vista does has a native version (just as OS X) and uses it everywhere so it's really jarring to have a different one in wx programs. Apparently the standard "Search Control" class is just a combination of "Edit" and "ToolbarWindow32" (with "Static" thrown in to show the inactive control contents) so we could emulate it easily even on pre-Vista systems. Or we could just use the native control, of course.

  • Buttons with images seem finally to be supported (they can be seen in e.g. "Tools" page of a disk properties dialog), so we should update wxButton to support this too.

  • As mentioned before, some file dialogs (e.g. Ctrl-O one in the dialogs sample) use old style while other ones (Ctrl-Q one) use a new style one which is inconsistent at best. Other dialogs seem to be just fine though, and the new Vista-style icons are used everywhere as expected, e.g. in the log dialog. Funny enough, the standard Vista error message dialog now looks a lot like wxWidgets standard log dialog with its "Details >>" button.



All in all I think wxWidgets applications look pretty decently under Vista, especially considering that we didn't spend any effort at all so far on porting the code to Vista. Of course, it's a tribute to Microsoft engineers backwards compatibility maintaining skills more than anything we did but it's still nice, especially compared with the transition to XP when previously working code started to crash and a lot of things didn't look right at all.

7 comments:

Anonymous said...

Nice post. Keep up the great work!

RobinD said...

I've had a user report that in wxListCtrl in report mode on Vista that the vertical spacing between items is very large. Did you notice that in your testing?

Anonymous said...

It would be fantastic to get bitmap+label support for wxButton. I've been making due with wxThing's wxCustomButton. Its look and feel doesn't really match real buttons very well.

How would interfaces for said button be developed? Would there be an implementation in the 2.8.1 time frame?

Anonymous said...

Great post,

We are currently developing a product using wxWidgets and as I am the primary developer on this side of the app, I have to compliment your ongoing great work for wxWidgets, and heartfelt appreciation for so much of simple and easy to implement classes for the windows implementation.

I have had nothing but great successes in learning about each of the libraries, and was amazed how I was able to code activex/flash/activex-and-flash event handling, and be able to control it all.

Thank you so much for keeping wxWidgets so up to date.

Anonymous said...

Actually, wxwidgets fails completely on Vista.

The #1 selling point for using wxwidgets has been that it looks and feels native on the most important platforms. What wxwidgets does is it uses winforms - the LEGACY widgets on Vista. That's not proper WPF and it looks and feels bad.

Wxwidgets is poised to lose a lot of users (new and old projects using it) and fast if it screws up looking native on the most important platform.

Olivier Giroux said...

I've had issues with Vista randomly thinking my wxWidgets application is hung when it's not. The same binary can work or not on Vista, but always works on XP and Linux.

My aplication is a plug-in for a piece of larger software and I don't own the main thread. I fire off a GUI thread on the side to run the message pump. I've had to do a small amount of shimming around wxWidgets to make it happy everywhere but this Vista issue has me stumped.

Anonymous said...

Nice comment!
Can you put some screenshots?

Regards!