It has been half a year since I submitted my VGUI implementation using Win32
API (vgui_impl_win32 for short). Following the advice of professor Joe
Munday, I've also been submitting nightly builds that include the
vgui_impl_win32 code to VXL dashboard (site name smarteye.com).
For the future development, I'd like to know your valueable comments of
vgui_impl_win32, in particular, what need to be improved so that it is
qualified enough to be incorperated into the vxl trunk? Thanks.
----- Original Message -----
From: "Joseph Mundy" <mundy@...>
To: "'Lianqing Yu'" <lqyu@...>;
Sent: Monday, January 04, 2010 7:32 PM
Subject: RE: [Vxl-maintainers] Win32 SDK Implementation of VGUI
> Thanks for your contribution. I will have someone in our lab look at your
> VGUI implementation over the next month or so and provide feedback. It is
> good idea to have more options. Also, have you thought of submitting
> builds to the VXL dashboard?
> Best wishes for the new year,
> Joe Mundy
> Prof. Eng. Brown University
> -----Original Message-----
> From: Lianqing Yu [mailto:lqyu@...]
> Sent: Wednesday, December 23, 2009 6:07 PM
> To: vxl-maintainers@...
> Cc: yulq@...
> Subject: [Vxl-maintainers] Win32 SDK Implementation of VGUI
> Hi, all
> I've developed a VGUI implementation using Win32 SDK toolkit and like to
> submit it to the VXL community for a review.
> The motivation of writing such as implementation to VGUI is that our
> laboratory use exclusively Windows as the working platform. We can use MFC
> implementation of VGUI but unfortunately we cannot afford the non-free
> Visual Studio versions that include MFC. Of course the Qt4 and wxWidgets
> implementation of VGUI can also be used under Windows, however we are not
> familiar with these two technologies and cannot use them to write in-house
> VGUI extensions.
> Development and testing
> I started writing Win32 SDK implementation of VGUI (vgui_impl_win32 for
> short) this July and have tested it since this September. In the test, we
> use all the VGUI example programs in $(VXLSRC)/core/vgui/examples, xcv in
> $(VXLSRC)/contrib/oxl/xcv, and our private vision applications using VXL.
> Five machines are used running a combination of Windows XP/Vista, Visual
> 2005/2008 (including Visual Studio trial edition as well as free Visual
> express edition), and Intel/NVIDIA/AMD video cards. All test machines run
> VXL release version 1.13.0 in both release and debug build. After four
> months of usage and testing, I believe vgui_impl_win32 has matured to the
> point of daily usage by the outside. First, nearly all features of VGUI
> toolkit have been implemented. Second, no crash due to vgui_impl_win32 is
> reported within recent two months (this November and December).
> Install and build vgui_impl_win32
> I've also attached a zip file with this email including the source code of
> vgui_impl_win32, a couple of scripts for CMake configuration, and a test
> report. To install vgui_impl_win32, please uncompress this file to a
> temporary fold and perform the following steps:
> 1.Put 'CMakeLists.txt', 'vgui_config.h.in' and 'vgui_register_all.cxx'
> to $(VXLSRC)\core\vgui and overwrite the files with the same name.
> 2.Put 'FindWin32SDK.cmake' to $(VXLSRC)\config\cmake\Modules\NewCMake.
> 3.Create a fold with the name 'win32' under $(VXLSRC)/core/vgui/impl, and
> copy all the *.h, *.cxx files to this fold.
> 4.Run CMake (I use cmake-gui) for your VXL installation. After choosing
> compiler, turn on BUILD_VGUI and click 'Configure'. Check 'Show Advanced
> Entries' and find two entries in red: WIN32SDK_INCLUDE_DIR and
> WIN32SDK_LIBRARIES. Set these two entries according to your Windows SDK
> installation. WIN32SDK_INCLUDE_DIR refers to the directory that holds
> Windows SDK header files, most importantly 'windows.h'. In my case, it is
> C:/Program Files/Microsoft SDKs/Windows/v6.1/Include. WIN32SDK_LIBRARIES
> refer to the libraries that must be linked into a Win32 application. In my
> case, it is C:/Program Files/Microsoft SDKs/Windows/v6.1/Lib/kernel32.lib.
> For simplicity in 'FindWin32SDK.cmake', I would not let users specify all
> libraries (kernal32.lib, user32.lib, gdi32.lib and so on) and foolishly
> believe they have already been installed if kernel32.lib is found. After
> WIN32SDK_INCLUDE_DIR and WIN32SDK_LIBRARIES, click 'Configure' again and a
> new entry named VGUI_USE_WIN32SDK should be added. Please check this
> and click 'Configure' until no entries are in red.
> 5. Build VXL as usual.
> 6. If one selects more than one VGUI implementations during VXL build,
> please add "--factory=win32" arguments to your VGUI applications if you
> Known problems and future work
> There are still some issues in vgui_impl_win32 that I do not have the
> knowledge and know-how to fix. Below are some minor issues:
> l The status bar is on top of the horizontal scrollbar, and is overlaid
> OpenGL area. In a typical Windows application, the horizontal scrollbar is
> usually above the status bar.
> l Mouse capture. The mouse is lost when it is moved out of the client
> Using Win32 function SetCapture results in strange behavior.
> l When CPU is busy, the UI stops response. (Since the same behavior is
> found in GTK and MFC, I guess this is a VGUI issue).
> l Font properties in dialog cannot be customized.
> In addition, the following areas need to be improved:
> First is the message processing framework. The canonical Win32 message
> processing loop plus the event handling switch-case statements is
> insufficient and inflexible when UI becomes complex. So I want to copy the
> idea of MFC but found cloning MFC is out of my reach. This cannot be done
> without the help from outside.
> Second is the idle event processing. This includes implementing virtual
> functions vgui_tableau::post_idle_request and vgui_tableau::idle.
> Third, the modaless dialog is not implemented. The message processing
> mechanism of a modaless dialog box is much more complicated than that of a
> modal dialog box. For a modal dialog box, we can simply disable the
> of parent window. Whereas for a modaless dialog, the messages of both
> box and its parent window have to be handled.
> Finally, I would like to know your opinions of vgui_impl_win32 so I can
> improve it in the future. Thanks.
> Best regards and merry Christmas
> Lianqing Yu
> National Laboratory of Pattern Recognition (NLPR) Institute of Automation,
> Chinese Academy of Sciences (CASIA)
> Email: lqyu@...