Friday, August 13, 2010

WxWidget/GTK vs QT


wxWidgets can be downloaded at
and current stable build is available at

wxWidgets not only works for C++, but also has bindings for python, perl, java, lua, eiffel, C# (.NET), basic, ruby and even javascript (see General Information for bindings).
It is one of the most complete GUI toolkits. There are many utility classes.
There is a lot of documentation (though a bit fragmented in places).
Free for personal and commercial use.
Whenever possible, wxWidgets uses the native platform SDK. This means that a program compiled on Windows will have the look and feel of a Windows program, and when compiled on a Linux machine, it will get the look and feel of a Linux program.
A positive side effect is that wxWidgets is thus more likely to look, behave and feel native - sometimes including native features for free (e.g. possibility to have spellchecking built-in in all text areas on OS X).
A negative side effect of this is that it is more likely that the behaviour is different between platforms; toolkits where widgets are lightweight lose some of the native aspect but also minimize platform-specific code (hence minimizing the risk of different behaviour from platform to platform and also minimizing the risk of platform-specific bugs). Concentrating on native looks also mean wx may not be best suited for applications that want a customized look instead of the system's theme.

Windows Build extract everything under


Go to C:\wxWidgets-2.8.11\build\msw

open wx.dsw with Visual Studio 2008. Visual Studio will then ask you if
you want to convert the Visual Studio 6 project to visual studio vcproj.
Select yes to all. By default wxWidgets will target win32 platform but
you can add x64 platform.

All lib will be generated under


wxWidget works well with GTK+ because GTK is one of the choice to build wxWidget on Linux.

GTK+, originally the Gimp toolkit, is a LGPL C-language GUI library for Unix systems.
It has been ported to Windows, VMS, and other systems (MacOS X currently possible through Apple's, native version in development) using the same API. However, primary development and focus is for Unix, with multi-platform development mostly as an afterthought.
GTK+ is the primary library used to construct user interfaces in GNOME.
Unlike wxWidgets, GTK+ supports C (and there is a C++ wrapper called GTKMM, )
The API is quite well developed, and includes safe casting and other things; but C++ has these built in.
It's built on top of glib, a general-purpose library (similar in some ways to the C++ STL -- it provides a few data structures, functions to help memory management, etc).
It looks the same on all platforms, except Windows XP, where it tries (with some success) to get Windows' native look and feel with the Wimp theme, which uses UxTheme. However, it's still very much a Unix library.

Building GTK+ on Windows requires MinGW and MSys which might mot be an easy task

Stable release for GTK+ is available on:

GNU/Linux and Unix
Windows (32-bit) and 64-bit

For windows
there are all-in-one bundles of the GTK+ stack including 3rd-party dependencies, both of GTK+ 2.16 and 2.20. The bundles contain both binaries and a lot of developer files, many of which are relatively irrelevant. If you intend to redistribute the GTK+ run-time, you need to figure out which files you can leave out yourself.

Download 2.20 bundle from
and extract everything under


Using CMake

CMake is a great way to generate Visual Studio 2008 solution for wxWidgets/GTK UI.
CMake GUI will help you browse for all library include path and library.
Cmake will update the build folder and cache all missing entry inside

# This is the CMakeCache file.
# For build in directory: c:/Dev/Project/Source/build
# It was generated by CMake: C:/Program Files (x86)/CMake 2.8/bin/cmake.exe
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.

When clicking on generate a solution for your compiler EG Visual Studio 2008
will be generated. From there you can open the solution and step into wxWidget/GTK UI.
GTK offer the advantage to be stable in term of API which means that if you build a UI using GTK today it should work 5 years from now.

Project using GTK

GNOME Desktop
Maemo surf tablet
GIMP on Linux and Windows and Mac
VMWare workstation
Inkscape Graphics Editor

and earlier
GTK+ on BeOS and GTK+ using DirectFB

On the other hand Trolltek team made quite some changes between QT 3 and QT 4 which require some work to translate old code to new code. See Moving from Qt 3 to Qt 4
When starting a project from scratch QT 4 would be a good solution.


Both Qt ( and wxWidgets have many non-GUI-related classes, such as date/time, containers, networking and OpenGL functionality.
Qt4.5 is available on MS Windows, Mac, and GNU/Linux under the LGPL and under a commercial license. All ports of wxWidgets are distributed under a permissive modified (but explicitly OSI-approved) LGPL, which allows development and distribution of proprietary applications without license costs.
Qt doesn't have true native ports like wxWidgets does. What we mean by this is that even though Qt draws them quite realistically, Qt draws its own widgets on each platform. It's worth mentioning though that Qt comes with special styles for Mac OS X and MS Windows XP and Vista that use native APIs (Appeareance Manager on Mac OS X, UxTheme on Windows XP) for drawing standard widget primitives (e.g. scrollbars or buttons) exactly like any native application. Event handling, the resulting visual feedback and widget layout are always implemented by Qt.
An approach similar to Qt's is achieved with wxUniversal.
It should be noted that on KDE and Qt for Embedded Linux platforms, Qt is the native GUI library.
Qt is used by several large projects like KDE (on the other hand, wxWidgets is used by projects like the AOL Communicator)
Qt makes extremely liberal use of virtual functions (QWidget, the base class of all widgets in Qt had 51 at last count), giving it a more OO design than wxWidgets (which uses a more MFC-like approach using macros). What this means is fewer lines of code in general when using Qt, but faster execution speed when using wxWidgets (although the degree to which this occurs depends on whom you ask).
Qt is used by IBM and Borland Kylix (discontinued): this should yield more reliability. However, it is rumoured that wxWidgets will be used in the next version of C++BuilderX.
Qt has a full-featured embeddable GUI (Qt for Embedded Linux) based on GNU/Linux with framebuffer. This means that once you have Linux with /dev/fb you are ready to run examples with no additional pains. Qt for Embedded Linux has a small footprint compared with X11.
There are numerous IDEs for Qt, QtDesigner, QtCreator, QDevelop, Edyuk as well as integrations with popular IDEs such as Visual Studio, Eclipse and XCode (though there are also several IDEs for wxWidgets).
Qt offers reliable commercial support (but so does wx, see
There is nothing to stop somebody writing a Qt-based implementation of wxWidgets, though wxWidgets applications can already be made to appear Qt-ish using wxGTK and GTK-Qt (this doesn’t work too good, though).

Thursday, August 05, 2010

Internet Explorer 8 Automation with Flash content using VBScript on Windows 7 64 bit

First of all running automation of Internet Explorer with Flash Content on a 64 bit OS is not easy because by default the OS will launch 64 bit version of Internet Explorer instead of the 32 bit version.


Set objIE = CreateObject( "InternetExplorer.Application" )
' specify the IE settings
objIE.Navigate ""
objIE.ToolBar = true
objIE.Resizable = False
objIE.StatusBar = False
objIE.Width = 800
objIE.Height = 600
' Make the window visible
objIE.Visible = True
WScript.Sleep 2000
'Set objIE = Nothing

Will lead to the following message

Flash Player on 64-bit operating systems

Products affected
You might be on this page because you can't view content with the Flash Player. This is likely because your computer is running a 64-bit Web browser on a 64-bit operating system and you are trying to install Flash Player. Flash Player does not run in most 64-bit browsers. If you attempt to download the Flash Player in a 64-bit browser that does not support Flash Player, you will see a message from Adobe and a link back to this page. To install Flash Player, use a 32-bit Web browser on your 64-bit operating system. All major browsers are available in 32-bit versions and the Internet Explorer 32-bit browser is the default browser on Windows 64-bit systems.

There are two InternetExplorer.Application objects on x64-bit systems, one for x32 bit, the other for x64. By default, the x64 bit version is launched when you call the object, because by default the x64 bit wscript.exe is used. But you can also launch the x32 bit version of the object by using the x32 bit version of wscript.exe and passing the vbs url to it as an argument:


Set WshShell = CreateObject("WScript.Shell")
WshShell.Run("%windir%\SysWOW64\wscript.exe " & Chr(34) & "C:\test\InternetExplorer.Application.vbs" & Chr(34))


The same works for all other x32 bit ActiveX objects in case you have to use them.

If you are using CoCreateInstance() of CLSID_InternetExplorer (to obtain an out-of-proc instance of iexplore.exe), you can pass one of these new flags in the dwClsCtx field to control which kind of server (32-bit or 64-bit) you get:

CLSCTX_ACTIVATE_32_BIT_SERVER = 0x40000, // Pick 32 bit server over 64 bit server
CLSCTX_ACTIVATE_64_BIT_SERVER = 0x80000 // Pick 64 bit server over 32 bit server

Wednesday, August 04, 2010


Activideo is a software created by a small company Actimus which can help you generate all what you need to produce the raw data needed for an interactive video experience. For more information about Activideo visit and to see how it work visit Some video tutorials are now available to explain you how to use Activideo
and user who purchase the software have access to online documentation.

Activideo is a fast and easy way to turn your videos into interactive presentations thanks to the export of well known Adobe XMP Metadata container. Activideo adds interactive hot spots (also called overlay sequences) to your videos. It is a simple but powerful concept: user-created hyperlinks within the video at various intervals and for specific areas in the video the same way hypertext is used on the Internet. These hyperlinks and interactive hotspots are exported into Adobe XMP RDF XML file format. Activideo could also produce Adobe Flash Action script 3 file along with a FLA and HTML template to be able to build your custom SWF with Adobe Flash CS4 or Adobe Flash CS5 thanks to a Plugin SDK. Actimus is about to release a live component for Flash CS5 which will provide the ability to validate/test each invisible hotspot by playing the video inside the Activideo Player.

Input Formats:

Activideo supports many input video file formats mostly any file format supported by the Direct Show software stack. Today, it currently supports MPEG1, MPEG2*, MPEG2-TS* transport streams including HD (720, 1080), DivX*, Microsoft AVI, Microsoft WMV* and WMV-HD *, Blueray * m2ts file, MKV, FLV and should work with WEBM (VP8). Activideo never modifies the original source video neither encode a Video. This tasks is left to Adobe Media Encoder and Adobe Bridge CS4 bundled with Adobe Flash CS4 Pro


The outlining of the overlay sequences is very precise because Activideo supports polygons with up to 100 vertices within a sequence. It performs linear interpolation of each vertex to transition smoothly from one shape to another. While the video is playing into Activideo, the user can move the current polygon location with the mouse visually to match any portion of the video associated and covered by polygon (and polygon are not visible on top of the final encoded Video. This is a human intervention process but it can be automated if the user doesn't plan to move the object on screen thanks to a very functional Wizard well suited to create a unique sequence and for example turn a logo encoded in the video into an hyperlink. To ease the overlay authoring process, a static logo sequence can be generate using the Creation Wizard.

Demo version:
Yes : Export of XMP
No : Project saving.
Yes : Wizard to create an interactive sequence available.
21 days of evaluation.

Full version:
Yes : Export XMP
Yes : Access to self registered COM Export Plug-ins available through Export As Menu
NO activation required.