From 3571e1add4e6ceb45ad88c224c432609f837a8dd Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Tue, 17 Aug 2010 14:48:50 +0000
Subject: [PATCH] Add new wxCommandLinkButton class.

A command link button wraps a native MSW control under recent Windows versions
and is implemented generically as a simple bitmap button elsewhere.

In the future, GTK implementation should allow using a different font for the
button label and its note.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 Makefile.in                                   |  72 ++++++-
 build/bakefiles/files.bkl                     |   4 +
 build/msw/makefile.bcc                        |  50 ++++-
 build/msw/makefile.gcc                        |  52 ++++-
 build/msw/makefile.vc                         |  50 ++++-
 build/msw/makefile.wat                        |  52 ++++-
 build/msw/wx_adv.dsp                          |  16 ++
 build/msw/wx_core.dsp                         |   8 +
 build/msw/wx_vc7_adv.vcproj                   |  12 ++
 build/msw/wx_vc7_core.vcproj                  |   6 +
 build/msw/wx_vc8_adv.vcproj                   |  16 ++
 build/msw/wx_vc8_core.vcproj                  |   8 +
 build/msw/wx_vc9_adv.vcproj                   |  16 ++
 build/msw/wx_vc9_core.vcproj                  |   8 +
 configure                                     |  54 +++++
 configure.in                                  |   7 +
 docs/changes.txt                              |   1 +
 .../images/wxgtk/commandlinkbutton.png        | Bin 0 -> 4761 bytes
 .../images/wxmsw/commandlinkbutton.png        | Bin 0 -> 3386 bytes
 include/wx/chkconf.h                          |  19 ++
 include/wx/commandlinkbutton.h                | 168 +++++++++++++++
 include/wx/motif/setup0.h                     |   1 +
 include/wx/msw/button.h                       |   6 +-
 include/wx/msw/commandlinkbutton.h            |  74 +++++++
 include/wx/msw/setup0.h                       |   1 +
 include/wx/msw/wince/setup.h                  |   1 +
 include/wx/os2/setup0.h                       |   1 +
 include/wx/osx/setup0.h                       |   1 +
 include/wx/palmos/setup0.h                    |   1 +
 include/wx/setup_inc.h                        |   1 +
 include/wx/univ/setup0.h                      |   1 +
 interface/wx/commandlinkbutton.h              | 173 +++++++++++++++
 samples/widgets/button.cpp                    |  90 +++++++-
 setup.h.in                                    |   1 +
 src/generic/commandlinkbuttong.cpp            |  69 ++++++
 src/msw/button.cpp                            | 124 ++++++-----
 src/msw/commandlinkbutton.cpp                 | 203 ++++++++++++++++++
 37 files changed, 1291 insertions(+), 76 deletions(-)
 create mode 100644 docs/doxygen/images/wxgtk/commandlinkbutton.png
 create mode 100644 docs/doxygen/images/wxmsw/commandlinkbutton.png
 create mode 100644 include/wx/commandlinkbutton.h
 create mode 100644 include/wx/msw/commandlinkbutton.h
 create mode 100644 interface/wx/commandlinkbutton.h
 create mode 100644 src/generic/commandlinkbuttong.cpp
 create mode 100644 src/msw/commandlinkbutton.cpp

diff --git a/Makefile.in b/Makefile.in
index b596d098b9..b11b273493 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3575,9 +3575,13 @@ COND_TOOLKIT_MOTIF_ADVANCED_PLATFORM_HDR =  \
 	wx/unix/taskbarx11.h \
 	wx/generic/animate.h
 @COND_TOOLKIT_MOTIF@ADVANCED_PLATFORM_HDR = $(COND_TOOLKIT_MOTIF_ADVANCED_PLATFORM_HDR)
-@COND_TOOLKIT_MSW@ADVANCED_PLATFORM_HDR = \
-@COND_TOOLKIT_MSW@	wx/msw/notifmsg.h wx/msw/sound.h wx/msw/taskbar.h \
-@COND_TOOLKIT_MSW@	wx/msw/joystick.h
+COND_TOOLKIT_MSW_ADVANCED_PLATFORM_HDR =  \
+	wx/msw/commandlinkbutton.h \
+	wx/msw/notifmsg.h \
+	wx/msw/sound.h \
+	wx/msw/taskbar.h \
+	wx/msw/joystick.h
+@COND_TOOLKIT_MSW@ADVANCED_PLATFORM_HDR = $(COND_TOOLKIT_MSW_ADVANCED_PLATFORM_HDR)
 COND_TOOLKIT_OSX_CARBON_ADVANCED_PLATFORM_HDR =  \
 	wx/generic/animate.h \
 	wx/osx/dataview.h \
@@ -3605,8 +3609,12 @@ COND_TOOLKIT_OSX_COCOA_ADVANCED_PLATFORM_HDR =  \
 @COND_TOOLKIT_OSX_IPHONE@	wx/generic/animate.h wx/osx/sound.h
 @COND_TOOLKIT_PM@ADVANCED_PLATFORM_HDR = \
 @COND_TOOLKIT_PM@	wx/generic/animate.h wx/os2/joystick.h wx/os2/sound.h
-@COND_TOOLKIT_WINCE@ADVANCED_PLATFORM_HDR = \
-@COND_TOOLKIT_WINCE@	wx/msw/notifmsg.h wx/msw/sound.h wx/msw/taskbar.h
+COND_TOOLKIT_WINCE_ADVANCED_PLATFORM_HDR =  \
+	wx/msw/commandlinkbutton.h \
+	wx/msw/notifmsg.h \
+	wx/msw/sound.h \
+	wx/msw/taskbar.h
+@COND_TOOLKIT_WINCE@ADVANCED_PLATFORM_HDR = $(COND_TOOLKIT_WINCE_ADVANCED_PLATFORM_HDR)
 @COND_TOOLKIT_X11@ADVANCED_PLATFORM_HDR = \
 @COND_TOOLKIT_X11@	wx/unix/joystick.h wx/unix/sound.h wx/unix/taskbarx11.h
 COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_ADVANCED_PLATFORM_NATIVE_HDR =  \
@@ -3629,6 +3637,7 @@ COND_WXUNIV_0_ADVANCED_HDR =  \
 	wx/animate.h \
 	wx/bmpcbox.h \
 	wx/calctrl.h \
+	wx/commandlinkbutton.h \
 	wx/dataview.h \
 	wx/datectrl.h \
 	wx/dateevt.h \
@@ -3675,6 +3684,7 @@ COND_WXUNIV_1_ADVANCED_HDR =  \
 	wx/animate.h \
 	wx/bmpcbox.h \
 	wx/calctrl.h \
+	wx/commandlinkbutton.h \
 	wx/dataview.h \
 	wx/datectrl.h \
 	wx/dateevt.h \
@@ -5942,6 +5952,7 @@ COND_WXUNIV_0___ADVANCED_SRC_OBJECTS =  \
 	monodll_aboutdlgg.o \
 	monodll_bmpcboxg.o \
 	monodll_calctrlg.o \
+	monodll_commandlinkbuttong.o \
 	monodll_datavgen.o \
 	monodll_datectlg.o \
 	monodll_editlbox.o \
@@ -5971,6 +5982,7 @@ COND_WXUNIV_1___ADVANCED_SRC_OBJECTS =  \
 	monodll_aboutdlgg.o \
 	monodll_bmpcboxg.o \
 	monodll_calctrlg.o \
+	monodll_commandlinkbuttong.o \
 	monodll_datavgen.o \
 	monodll_datectlg.o \
 	monodll_editlbox.o \
@@ -7810,6 +7822,7 @@ COND_WXUNIV_0___ADVANCED_SRC_OBJECTS_1 =  \
 	monolib_aboutdlgg.o \
 	monolib_bmpcboxg.o \
 	monolib_calctrlg.o \
+	monolib_commandlinkbuttong.o \
 	monolib_datavgen.o \
 	monolib_datectlg.o \
 	monolib_editlbox.o \
@@ -7839,6 +7852,7 @@ COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_1 =  \
 	monolib_aboutdlgg.o \
 	monolib_bmpcboxg.o \
 	monolib_calctrlg.o \
+	monolib_commandlinkbuttong.o \
 	monolib_datavgen.o \
 	monolib_datectlg.o \
 	monolib_editlbox.o \
@@ -11475,6 +11489,7 @@ COND_WXUNIV_0___ADVANCED_SRC_OBJECTS_2 =  \
 	advdll_aboutdlgg.o \
 	advdll_bmpcboxg.o \
 	advdll_calctrlg.o \
+	advdll_commandlinkbuttong.o \
 	advdll_datavgen.o \
 	advdll_datectlg.o \
 	advdll_editlbox.o \
@@ -11504,6 +11519,7 @@ COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_2 =  \
 	advdll_aboutdlgg.o \
 	advdll_bmpcboxg.o \
 	advdll_calctrlg.o \
+	advdll_commandlinkbuttong.o \
 	advdll_datavgen.o \
 	advdll_datectlg.o \
 	advdll_editlbox.o \
@@ -11569,6 +11585,7 @@ COND_WXUNIV_0___ADVANCED_SRC_OBJECTS_3 =  \
 	advlib_aboutdlgg.o \
 	advlib_bmpcboxg.o \
 	advlib_calctrlg.o \
+	advlib_commandlinkbuttong.o \
 	advlib_datavgen.o \
 	advlib_datectlg.o \
 	advlib_editlbox.o \
@@ -11598,6 +11615,7 @@ COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_3 =  \
 	advlib_aboutdlgg.o \
 	advlib_bmpcboxg.o \
 	advlib_calctrlg.o \
+	advlib_commandlinkbuttong.o \
 	advlib_datavgen.o \
 	advlib_datectlg.o \
 	advlib_editlbox.o \
@@ -12786,6 +12804,7 @@ COND_TOOLKIT_MOTIF___ADVANCED_PLATFORM_SRC_OBJECTS =  \
 COND_TOOLKIT_MSW___ADVANCED_PLATFORM_SRC_OBJECTS =  \
 	monodll_taskbarcmn.o \
 	monodll_msw_aboutdlg.o \
+	monodll_commandlinkbutton.o \
 	monodll_msw_notifmsg.o \
 	monodll_msw_sound.o \
 	monodll_msw_taskbar.o \
@@ -12824,6 +12843,7 @@ COND_TOOLKIT_OSX_COCOA___ADVANCED_PLATFORM_SRC_OBJECTS =  \
 COND_TOOLKIT_WINCE___ADVANCED_PLATFORM_SRC_OBJECTS =  \
 	monodll_taskbarcmn.o \
 	monodll_msw_aboutdlg.o \
+	monodll_commandlinkbutton.o \
 	monodll_msw_notifmsg.o \
 	monodll_msw_sound.o \
 	monodll_msw_taskbar.o
@@ -12971,6 +12991,7 @@ COND_TOOLKIT_MOTIF___ADVANCED_PLATFORM_SRC_OBJECTS_0 =  \
 COND_TOOLKIT_MSW___ADVANCED_PLATFORM_SRC_OBJECTS_0 =  \
 	monolib_taskbarcmn.o \
 	monolib_msw_aboutdlg.o \
+	monolib_commandlinkbutton.o \
 	monolib_msw_notifmsg.o \
 	monolib_msw_sound.o \
 	monolib_msw_taskbar.o \
@@ -13009,6 +13030,7 @@ COND_TOOLKIT_OSX_COCOA___ADVANCED_PLATFORM_SRC_OBJECTS_0 =  \
 COND_TOOLKIT_WINCE___ADVANCED_PLATFORM_SRC_OBJECTS_0 =  \
 	monolib_taskbarcmn.o \
 	monolib_msw_aboutdlg.o \
+	monolib_commandlinkbutton.o \
 	monolib_msw_notifmsg.o \
 	monolib_msw_sound.o \
 	monolib_msw_taskbar.o
@@ -13253,6 +13275,7 @@ COND_TOOLKIT_MOTIF___ADVANCED_PLATFORM_SRC_OBJECTS_8 =  \
 COND_TOOLKIT_MSW___ADVANCED_PLATFORM_SRC_OBJECTS_8 =  \
 	advdll_taskbarcmn.o \
 	advdll_msw_aboutdlg.o \
+	advdll_commandlinkbutton.o \
 	advdll_msw_notifmsg.o \
 	advdll_msw_sound.o \
 	advdll_msw_taskbar.o \
@@ -13291,6 +13314,7 @@ COND_TOOLKIT_OSX_COCOA___ADVANCED_PLATFORM_SRC_OBJECTS_8 =  \
 COND_TOOLKIT_WINCE___ADVANCED_PLATFORM_SRC_OBJECTS_8 =  \
 	advdll_taskbarcmn.o \
 	advdll_msw_aboutdlg.o \
+	advdll_commandlinkbutton.o \
 	advdll_msw_notifmsg.o \
 	advdll_msw_sound.o \
 	advdll_msw_taskbar.o
@@ -13341,6 +13365,7 @@ COND_TOOLKIT_MOTIF___ADVANCED_PLATFORM_SRC_OBJECTS_9 =  \
 COND_TOOLKIT_MSW___ADVANCED_PLATFORM_SRC_OBJECTS_9 =  \
 	advlib_taskbarcmn.o \
 	advlib_msw_aboutdlg.o \
+	advlib_commandlinkbutton.o \
 	advlib_msw_notifmsg.o \
 	advlib_msw_sound.o \
 	advlib_msw_taskbar.o \
@@ -13379,6 +13404,7 @@ COND_TOOLKIT_OSX_COCOA___ADVANCED_PLATFORM_SRC_OBJECTS_9 =  \
 COND_TOOLKIT_WINCE___ADVANCED_PLATFORM_SRC_OBJECTS_9 =  \
 	advlib_taskbarcmn.o \
 	advlib_msw_aboutdlg.o \
+	advlib_commandlinkbutton.o \
 	advlib_msw_notifmsg.o \
 	advlib_msw_sound.o \
 	advlib_msw_taskbar.o
@@ -19917,6 +19943,9 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
 @COND_USE_GUI_1@monodll_calctrlg.o: $(srcdir)/src/generic/calctrlg.cpp $(MONODLL_ODEP)
 @COND_USE_GUI_1@	$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/calctrlg.cpp
 
+@COND_USE_GUI_1@monodll_commandlinkbuttong.o: $(srcdir)/src/generic/commandlinkbuttong.cpp $(MONODLL_ODEP)
+@COND_USE_GUI_1@	$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/commandlinkbuttong.cpp
+
 @COND_USE_GUI_1@monodll_datavgen.o: $(srcdir)/src/generic/datavgen.cpp $(MONODLL_ODEP)
 @COND_USE_GUI_1@	$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/datavgen.cpp
 
@@ -20004,6 +20033,12 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_WINCE_USE_GUI_1@monodll_msw_aboutdlg.o: $(srcdir)/src/msw/aboutdlg.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_WINCE_USE_GUI_1@	$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/aboutdlg.cpp
 
+@COND_TOOLKIT_MSW_USE_GUI_1@monodll_commandlinkbutton.o: $(srcdir)/src/msw/commandlinkbutton.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1@	$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/commandlinkbutton.cpp
+
+@COND_TOOLKIT_WINCE_USE_GUI_1@monodll_commandlinkbutton.o: $(srcdir)/src/msw/commandlinkbutton.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1@	$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/commandlinkbutton.cpp
+
 @COND_TOOLKIT_MSW_USE_GUI_1@monodll_msw_notifmsg.o: $(srcdir)/src/msw/notifmsg.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_MSW_USE_GUI_1@	$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/notifmsg.cpp
 
@@ -25119,6 +25154,9 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
 @COND_USE_GUI_1@monolib_calctrlg.o: $(srcdir)/src/generic/calctrlg.cpp $(MONOLIB_ODEP)
 @COND_USE_GUI_1@	$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/calctrlg.cpp
 
+@COND_USE_GUI_1@monolib_commandlinkbuttong.o: $(srcdir)/src/generic/commandlinkbuttong.cpp $(MONOLIB_ODEP)
+@COND_USE_GUI_1@	$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/commandlinkbuttong.cpp
+
 @COND_USE_GUI_1@monolib_datavgen.o: $(srcdir)/src/generic/datavgen.cpp $(MONOLIB_ODEP)
 @COND_USE_GUI_1@	$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/datavgen.cpp
 
@@ -25206,6 +25244,12 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_WINCE_USE_GUI_1@monolib_msw_aboutdlg.o: $(srcdir)/src/msw/aboutdlg.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_WINCE_USE_GUI_1@	$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/aboutdlg.cpp
 
+@COND_TOOLKIT_MSW_USE_GUI_1@monolib_commandlinkbutton.o: $(srcdir)/src/msw/commandlinkbutton.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1@	$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/commandlinkbutton.cpp
+
+@COND_TOOLKIT_WINCE_USE_GUI_1@monolib_commandlinkbutton.o: $(srcdir)/src/msw/commandlinkbutton.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1@	$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/commandlinkbutton.cpp
+
 @COND_TOOLKIT_MSW_USE_GUI_1@monolib_msw_notifmsg.o: $(srcdir)/src/msw/notifmsg.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_MSW_USE_GUI_1@	$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/notifmsg.cpp
 
@@ -34449,6 +34493,9 @@ advdll_bmpcboxg.o: $(srcdir)/src/generic/bmpcboxg.cpp $(ADVDLL_ODEP)
 advdll_calctrlg.o: $(srcdir)/src/generic/calctrlg.cpp $(ADVDLL_ODEP)
 	$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/generic/calctrlg.cpp
 
+advdll_commandlinkbuttong.o: $(srcdir)/src/generic/commandlinkbuttong.cpp $(ADVDLL_ODEP)
+	$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/generic/commandlinkbuttong.cpp
+
 advdll_datavgen.o: $(srcdir)/src/generic/datavgen.cpp $(ADVDLL_ODEP)
 	$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/generic/datavgen.cpp
 
@@ -34536,6 +34583,12 @@ advdll_wizard.o: $(srcdir)/src/generic/wizard.cpp $(ADVDLL_ODEP)
 @COND_TOOLKIT_WINCE@advdll_msw_aboutdlg.o: $(srcdir)/src/msw/aboutdlg.cpp $(ADVDLL_ODEP)
 @COND_TOOLKIT_WINCE@	$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/aboutdlg.cpp
 
+@COND_TOOLKIT_MSW@advdll_commandlinkbutton.o: $(srcdir)/src/msw/commandlinkbutton.cpp $(ADVDLL_ODEP)
+@COND_TOOLKIT_MSW@	$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/commandlinkbutton.cpp
+
+@COND_TOOLKIT_WINCE@advdll_commandlinkbutton.o: $(srcdir)/src/msw/commandlinkbutton.cpp $(ADVDLL_ODEP)
+@COND_TOOLKIT_WINCE@	$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/commandlinkbutton.cpp
+
 @COND_TOOLKIT_MSW@advdll_msw_notifmsg.o: $(srcdir)/src/msw/notifmsg.cpp $(ADVDLL_ODEP)
 @COND_TOOLKIT_MSW@	$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/notifmsg.cpp
 
@@ -34782,6 +34835,9 @@ advlib_bmpcboxg.o: $(srcdir)/src/generic/bmpcboxg.cpp $(ADVLIB_ODEP)
 advlib_calctrlg.o: $(srcdir)/src/generic/calctrlg.cpp $(ADVLIB_ODEP)
 	$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/generic/calctrlg.cpp
 
+advlib_commandlinkbuttong.o: $(srcdir)/src/generic/commandlinkbuttong.cpp $(ADVLIB_ODEP)
+	$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/generic/commandlinkbuttong.cpp
+
 advlib_datavgen.o: $(srcdir)/src/generic/datavgen.cpp $(ADVLIB_ODEP)
 	$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/generic/datavgen.cpp
 
@@ -34869,6 +34925,12 @@ advlib_wizard.o: $(srcdir)/src/generic/wizard.cpp $(ADVLIB_ODEP)
 @COND_TOOLKIT_WINCE@advlib_msw_aboutdlg.o: $(srcdir)/src/msw/aboutdlg.cpp $(ADVLIB_ODEP)
 @COND_TOOLKIT_WINCE@	$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/aboutdlg.cpp
 
+@COND_TOOLKIT_MSW@advlib_commandlinkbutton.o: $(srcdir)/src/msw/commandlinkbutton.cpp $(ADVLIB_ODEP)
+@COND_TOOLKIT_MSW@	$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/commandlinkbutton.cpp
+
+@COND_TOOLKIT_WINCE@advlib_commandlinkbutton.o: $(srcdir)/src/msw/commandlinkbutton.cpp $(ADVLIB_ODEP)
+@COND_TOOLKIT_WINCE@	$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/commandlinkbutton.cpp
+
 @COND_TOOLKIT_MSW@advlib_msw_notifmsg.o: $(srcdir)/src/msw/notifmsg.cpp $(ADVLIB_ODEP)
 @COND_TOOLKIT_MSW@	$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/notifmsg.cpp
 
diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl
index 1cf7f6bac0..1984a8d064 100644
--- a/build/bakefiles/files.bkl
+++ b/build/bakefiles/files.bkl
@@ -2899,6 +2899,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     src/generic/aboutdlgg.cpp
     src/generic/bmpcboxg.cpp
     src/generic/calctrlg.cpp
+    src/generic/commandlinkbuttong.cpp
     src/generic/datavgen.cpp
     src/generic/datectlg.cpp
     src/generic/editlbox.cpp
@@ -2923,6 +2924,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     wx/animate.h
     wx/bmpcbox.h
     wx/calctrl.h
+    wx/commandlinkbutton.h
     wx/dataview.h
     wx/datectrl.h
     wx/dateevt.h
@@ -2966,11 +2968,13 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
 <set var="ADVANCED_MSW_SRC" hints="files">
     src/common/taskbarcmn.cpp
     src/msw/aboutdlg.cpp
+    src/msw/commandlinkbutton.cpp
     src/msw/notifmsg.cpp
     src/msw/sound.cpp
     src/msw/taskbar.cpp
 </set>
 <set var="ADVANCED_MSW_HDR" hints="files">
+    wx/msw/commandlinkbutton.h
     wx/msw/notifmsg.h
     wx/msw/sound.h
     wx/msw/taskbar.h
diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc
index 6a124113c3..aea7565c45 100644
--- a/build/msw/makefile.bcc
+++ b/build/msw/makefile.bcc
@@ -1519,7 +1519,7 @@ __wxjpeg___depname = $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib
 !if "$(USE_GUI)" == "1"
 __wxtiff___depname = $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib
 !endif
-!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1"
+!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1"
 __wxscintilla_usingdll_p = -DWXUSINGDLL
 !endif
 !if "$(MONOLITHIC)" == "0"
@@ -2170,6 +2170,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
 	$(OBJS)\monodll_aboutdlgg.obj \
 	$(OBJS)\monodll_bmpcboxg.obj \
 	$(OBJS)\monodll_calctrlg.obj \
+	$(OBJS)\monodll_commandlinkbuttong.obj \
 	$(OBJS)\monodll_datavgen.obj \
 	$(OBJS)\monodll_datectlg.obj \
 	$(OBJS)\monodll_editlbox.obj \
@@ -2189,6 +2190,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
 	$(OBJS)\monodll_wizard.obj \
 	$(OBJS)\monodll_taskbarcmn.obj \
 	$(OBJS)\monodll_aboutdlg.obj \
+	$(OBJS)\monodll_commandlinkbutton.obj \
 	$(OBJS)\monodll_notifmsg.obj \
 	$(OBJS)\monodll_sound.obj \
 	$(OBJS)\monodll_taskbar.obj \
@@ -2209,6 +2211,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
 	$(OBJS)\monodll_aboutdlgg.obj \
 	$(OBJS)\monodll_bmpcboxg.obj \
 	$(OBJS)\monodll_calctrlg.obj \
+	$(OBJS)\monodll_commandlinkbuttong.obj \
 	$(OBJS)\monodll_datavgen.obj \
 	$(OBJS)\monodll_datectlg.obj \
 	$(OBJS)\monodll_editlbox.obj \
@@ -2228,6 +2231,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
 	$(OBJS)\monodll_wizard.obj \
 	$(OBJS)\monodll_taskbarcmn.obj \
 	$(OBJS)\monodll_aboutdlg.obj \
+	$(OBJS)\monodll_commandlinkbutton.obj \
 	$(OBJS)\monodll_notifmsg.obj \
 	$(OBJS)\monodll_sound.obj \
 	$(OBJS)\monodll_taskbar.obj \
@@ -2879,6 +2883,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
 	$(OBJS)\monolib_aboutdlgg.obj \
 	$(OBJS)\monolib_bmpcboxg.obj \
 	$(OBJS)\monolib_calctrlg.obj \
+	$(OBJS)\monolib_commandlinkbuttong.obj \
 	$(OBJS)\monolib_datavgen.obj \
 	$(OBJS)\monolib_datectlg.obj \
 	$(OBJS)\monolib_editlbox.obj \
@@ -2898,6 +2903,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
 	$(OBJS)\monolib_wizard.obj \
 	$(OBJS)\monolib_taskbarcmn.obj \
 	$(OBJS)\monolib_aboutdlg.obj \
+	$(OBJS)\monolib_commandlinkbutton.obj \
 	$(OBJS)\monolib_notifmsg.obj \
 	$(OBJS)\monolib_sound.obj \
 	$(OBJS)\monolib_taskbar.obj \
@@ -2918,6 +2924,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
 	$(OBJS)\monolib_aboutdlgg.obj \
 	$(OBJS)\monolib_bmpcboxg.obj \
 	$(OBJS)\monolib_calctrlg.obj \
+	$(OBJS)\monolib_commandlinkbuttong.obj \
 	$(OBJS)\monolib_datavgen.obj \
 	$(OBJS)\monolib_datectlg.obj \
 	$(OBJS)\monolib_editlbox.obj \
@@ -2937,6 +2944,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
 	$(OBJS)\monolib_wizard.obj \
 	$(OBJS)\monolib_taskbarcmn.obj \
 	$(OBJS)\monolib_aboutdlg.obj \
+	$(OBJS)\monolib_commandlinkbutton.obj \
 	$(OBJS)\monolib_notifmsg.obj \
 	$(OBJS)\monolib_sound.obj \
 	$(OBJS)\monolib_taskbar.obj \
@@ -3987,6 +3995,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
 	$(OBJS)\advdll_aboutdlgg.obj \
 	$(OBJS)\advdll_bmpcboxg.obj \
 	$(OBJS)\advdll_calctrlg.obj \
+	$(OBJS)\advdll_commandlinkbuttong.obj \
 	$(OBJS)\advdll_datavgen.obj \
 	$(OBJS)\advdll_datectlg.obj \
 	$(OBJS)\advdll_editlbox.obj \
@@ -4006,6 +4015,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
 	$(OBJS)\advdll_wizard.obj \
 	$(OBJS)\advdll_taskbarcmn.obj \
 	$(OBJS)\advdll_aboutdlg.obj \
+	$(OBJS)\advdll_commandlinkbutton.obj \
 	$(OBJS)\advdll_notifmsg.obj \
 	$(OBJS)\advdll_sound.obj \
 	$(OBJS)\advdll_taskbar.obj \
@@ -4026,6 +4036,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
 	$(OBJS)\advdll_aboutdlgg.obj \
 	$(OBJS)\advdll_bmpcboxg.obj \
 	$(OBJS)\advdll_calctrlg.obj \
+	$(OBJS)\advdll_commandlinkbuttong.obj \
 	$(OBJS)\advdll_datavgen.obj \
 	$(OBJS)\advdll_datectlg.obj \
 	$(OBJS)\advdll_editlbox.obj \
@@ -4045,6 +4056,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
 	$(OBJS)\advdll_wizard.obj \
 	$(OBJS)\advdll_taskbarcmn.obj \
 	$(OBJS)\advdll_aboutdlg.obj \
+	$(OBJS)\advdll_commandlinkbutton.obj \
 	$(OBJS)\advdll_notifmsg.obj \
 	$(OBJS)\advdll_sound.obj \
 	$(OBJS)\advdll_taskbar.obj \
@@ -4065,6 +4077,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
 	$(OBJS)\advlib_aboutdlgg.obj \
 	$(OBJS)\advlib_bmpcboxg.obj \
 	$(OBJS)\advlib_calctrlg.obj \
+	$(OBJS)\advlib_commandlinkbuttong.obj \
 	$(OBJS)\advlib_datavgen.obj \
 	$(OBJS)\advlib_datectlg.obj \
 	$(OBJS)\advlib_editlbox.obj \
@@ -4084,6 +4097,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
 	$(OBJS)\advlib_wizard.obj \
 	$(OBJS)\advlib_taskbarcmn.obj \
 	$(OBJS)\advlib_aboutdlg.obj \
+	$(OBJS)\advlib_commandlinkbutton.obj \
 	$(OBJS)\advlib_notifmsg.obj \
 	$(OBJS)\advlib_sound.obj \
 	$(OBJS)\advlib_taskbar.obj \
@@ -4104,6 +4118,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
 	$(OBJS)\advlib_aboutdlgg.obj \
 	$(OBJS)\advlib_bmpcboxg.obj \
 	$(OBJS)\advlib_calctrlg.obj \
+	$(OBJS)\advlib_commandlinkbuttong.obj \
 	$(OBJS)\advlib_datavgen.obj \
 	$(OBJS)\advlib_datectlg.obj \
 	$(OBJS)\advlib_editlbox.obj \
@@ -4123,6 +4138,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
 	$(OBJS)\advlib_wizard.obj \
 	$(OBJS)\advlib_taskbarcmn.obj \
 	$(OBJS)\advlib_aboutdlg.obj \
+	$(OBJS)\advlib_commandlinkbutton.obj \
 	$(OBJS)\advlib_notifmsg.obj \
 	$(OBJS)\advlib_sound.obj \
 	$(OBJS)\advlib_taskbar.obj \
@@ -7770,6 +7786,11 @@ $(OBJS)\monodll_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
 	$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
 !endif
 
+!if "$(USE_GUI)" == "1"
+$(OBJS)\monodll_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp
+	$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp
+!endif
+
 !if "$(USE_GUI)" == "1"
 $(OBJS)\monodll_datavgen.obj: ..\..\src\generic\datavgen.cpp
 	$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\datavgen.cpp
@@ -7865,6 +7886,11 @@ $(OBJS)\monodll_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp
 	$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp
 !endif
 
+!if "$(USE_GUI)" == "1"
+$(OBJS)\monodll_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp
+	$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp
+!endif
+
 !if "$(USE_GUI)" == "1"
 $(OBJS)\monodll_notifmsg.obj: ..\..\src\msw\notifmsg.cpp
 	$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\notifmsg.cpp
@@ -9977,6 +10003,11 @@ $(OBJS)\monolib_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
 	$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
 !endif
 
+!if "$(USE_GUI)" == "1"
+$(OBJS)\monolib_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp
+	$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp
+!endif
+
 !if "$(USE_GUI)" == "1"
 $(OBJS)\monolib_datavgen.obj: ..\..\src\generic\datavgen.cpp
 	$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\datavgen.cpp
@@ -10072,6 +10103,11 @@ $(OBJS)\monolib_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp
 	$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp
 !endif
 
+!if "$(USE_GUI)" == "1"
+$(OBJS)\monolib_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp
+	$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp
+!endif
+
 !if "$(USE_GUI)" == "1"
 $(OBJS)\monolib_notifmsg.obj: ..\..\src\msw\notifmsg.cpp
 	$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\notifmsg.cpp
@@ -13486,6 +13522,9 @@ $(OBJS)\advdll_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp
 $(OBJS)\advdll_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
 	$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
 
+$(OBJS)\advdll_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp
+	$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp
+
 $(OBJS)\advdll_datavgen.obj: ..\..\src\generic\datavgen.cpp
 	$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\datavgen.cpp
 
@@ -13543,6 +13582,9 @@ $(OBJS)\advdll_taskbarcmn.obj: ..\..\src\common\taskbarcmn.cpp
 $(OBJS)\advdll_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp
 	$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp
 
+$(OBJS)\advdll_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp
+	$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp
+
 $(OBJS)\advdll_notifmsg.obj: ..\..\src\msw\notifmsg.cpp
 	$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\notifmsg.cpp
 
@@ -13597,6 +13639,9 @@ $(OBJS)\advlib_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp
 $(OBJS)\advlib_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
 	$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
 
+$(OBJS)\advlib_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp
+	$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp
+
 $(OBJS)\advlib_datavgen.obj: ..\..\src\generic\datavgen.cpp
 	$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\datavgen.cpp
 
@@ -13654,6 +13699,9 @@ $(OBJS)\advlib_taskbarcmn.obj: ..\..\src\common\taskbarcmn.cpp
 $(OBJS)\advlib_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp
 	$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp
 
+$(OBJS)\advlib_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp
+	$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp
+
 $(OBJS)\advlib_notifmsg.obj: ..\..\src\msw\notifmsg.cpp
 	$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\notifmsg.cpp
 
diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc
index 0c56aa6f7d..d5db1c952f 100644
--- a/build/msw/makefile.gcc
+++ b/build/msw/makefile.gcc
@@ -1525,11 +1525,11 @@ endif
 ifeq ($(USE_GUI),1)
 __wxtiff___depname = $(LIBDIRNAME)\libwxtiff$(WXDEBUGFLAG).a
 endif
-ifeq ($(MONOLITHIC),0)
+ifeq ($(MONOLITHIC),0)
 ifeq ($(SHARED),1)
 __wxscintilla_usingdll_p = -DWXUSINGDLL
 endif
-endif
+endif
 ifeq ($(MONOLITHIC),0)
 EXTRALIBS_FOR_BASE = 
 endif
@@ -2184,6 +2184,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
 	$(OBJS)\monodll_aboutdlgg.o \
 	$(OBJS)\monodll_bmpcboxg.o \
 	$(OBJS)\monodll_calctrlg.o \
+	$(OBJS)\monodll_commandlinkbuttong.o \
 	$(OBJS)\monodll_datavgen.o \
 	$(OBJS)\monodll_datectlg.o \
 	$(OBJS)\monodll_editlbox.o \
@@ -2203,6 +2204,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
 	$(OBJS)\monodll_wizard.o \
 	$(OBJS)\monodll_taskbarcmn.o \
 	$(OBJS)\monodll_aboutdlg.o \
+	$(OBJS)\monodll_commandlinkbutton.o \
 	$(OBJS)\monodll_notifmsg.o \
 	$(OBJS)\monodll_sound.o \
 	$(OBJS)\monodll_taskbar.o \
@@ -2223,6 +2225,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
 	$(OBJS)\monodll_aboutdlgg.o \
 	$(OBJS)\monodll_bmpcboxg.o \
 	$(OBJS)\monodll_calctrlg.o \
+	$(OBJS)\monodll_commandlinkbuttong.o \
 	$(OBJS)\monodll_datavgen.o \
 	$(OBJS)\monodll_datectlg.o \
 	$(OBJS)\monodll_editlbox.o \
@@ -2242,6 +2245,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
 	$(OBJS)\monodll_wizard.o \
 	$(OBJS)\monodll_taskbarcmn.o \
 	$(OBJS)\monodll_aboutdlg.o \
+	$(OBJS)\monodll_commandlinkbutton.o \
 	$(OBJS)\monodll_notifmsg.o \
 	$(OBJS)\monodll_sound.o \
 	$(OBJS)\monodll_taskbar.o \
@@ -2899,6 +2903,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
 	$(OBJS)\monolib_aboutdlgg.o \
 	$(OBJS)\monolib_bmpcboxg.o \
 	$(OBJS)\monolib_calctrlg.o \
+	$(OBJS)\monolib_commandlinkbuttong.o \
 	$(OBJS)\monolib_datavgen.o \
 	$(OBJS)\monolib_datectlg.o \
 	$(OBJS)\monolib_editlbox.o \
@@ -2918,6 +2923,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
 	$(OBJS)\monolib_wizard.o \
 	$(OBJS)\monolib_taskbarcmn.o \
 	$(OBJS)\monolib_aboutdlg.o \
+	$(OBJS)\monolib_commandlinkbutton.o \
 	$(OBJS)\monolib_notifmsg.o \
 	$(OBJS)\monolib_sound.o \
 	$(OBJS)\monolib_taskbar.o \
@@ -2938,6 +2944,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
 	$(OBJS)\monolib_aboutdlgg.o \
 	$(OBJS)\monolib_bmpcboxg.o \
 	$(OBJS)\monolib_calctrlg.o \
+	$(OBJS)\monolib_commandlinkbuttong.o \
 	$(OBJS)\monolib_datavgen.o \
 	$(OBJS)\monolib_datectlg.o \
 	$(OBJS)\monolib_editlbox.o \
@@ -2957,6 +2964,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
 	$(OBJS)\monolib_wizard.o \
 	$(OBJS)\monolib_taskbarcmn.o \
 	$(OBJS)\monolib_aboutdlg.o \
+	$(OBJS)\monolib_commandlinkbutton.o \
 	$(OBJS)\monolib_notifmsg.o \
 	$(OBJS)\monolib_sound.o \
 	$(OBJS)\monolib_taskbar.o \
@@ -4035,6 +4043,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
 	$(OBJS)\advdll_aboutdlgg.o \
 	$(OBJS)\advdll_bmpcboxg.o \
 	$(OBJS)\advdll_calctrlg.o \
+	$(OBJS)\advdll_commandlinkbuttong.o \
 	$(OBJS)\advdll_datavgen.o \
 	$(OBJS)\advdll_datectlg.o \
 	$(OBJS)\advdll_editlbox.o \
@@ -4054,6 +4063,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
 	$(OBJS)\advdll_wizard.o \
 	$(OBJS)\advdll_taskbarcmn.o \
 	$(OBJS)\advdll_aboutdlg.o \
+	$(OBJS)\advdll_commandlinkbutton.o \
 	$(OBJS)\advdll_notifmsg.o \
 	$(OBJS)\advdll_sound.o \
 	$(OBJS)\advdll_taskbar.o \
@@ -4074,6 +4084,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
 	$(OBJS)\advdll_aboutdlgg.o \
 	$(OBJS)\advdll_bmpcboxg.o \
 	$(OBJS)\advdll_calctrlg.o \
+	$(OBJS)\advdll_commandlinkbuttong.o \
 	$(OBJS)\advdll_datavgen.o \
 	$(OBJS)\advdll_datectlg.o \
 	$(OBJS)\advdll_editlbox.o \
@@ -4093,6 +4104,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
 	$(OBJS)\advdll_wizard.o \
 	$(OBJS)\advdll_taskbarcmn.o \
 	$(OBJS)\advdll_aboutdlg.o \
+	$(OBJS)\advdll_commandlinkbutton.o \
 	$(OBJS)\advdll_notifmsg.o \
 	$(OBJS)\advdll_sound.o \
 	$(OBJS)\advdll_taskbar.o \
@@ -4117,6 +4129,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
 	$(OBJS)\advlib_aboutdlgg.o \
 	$(OBJS)\advlib_bmpcboxg.o \
 	$(OBJS)\advlib_calctrlg.o \
+	$(OBJS)\advlib_commandlinkbuttong.o \
 	$(OBJS)\advlib_datavgen.o \
 	$(OBJS)\advlib_datectlg.o \
 	$(OBJS)\advlib_editlbox.o \
@@ -4136,6 +4149,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
 	$(OBJS)\advlib_wizard.o \
 	$(OBJS)\advlib_taskbarcmn.o \
 	$(OBJS)\advlib_aboutdlg.o \
+	$(OBJS)\advlib_commandlinkbutton.o \
 	$(OBJS)\advlib_notifmsg.o \
 	$(OBJS)\advlib_sound.o \
 	$(OBJS)\advlib_taskbar.o \
@@ -4156,6 +4170,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
 	$(OBJS)\advlib_aboutdlgg.o \
 	$(OBJS)\advlib_bmpcboxg.o \
 	$(OBJS)\advlib_calctrlg.o \
+	$(OBJS)\advlib_commandlinkbuttong.o \
 	$(OBJS)\advlib_datavgen.o \
 	$(OBJS)\advlib_datectlg.o \
 	$(OBJS)\advlib_editlbox.o \
@@ -4175,6 +4190,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
 	$(OBJS)\advlib_wizard.o \
 	$(OBJS)\advlib_taskbarcmn.o \
 	$(OBJS)\advlib_aboutdlg.o \
+	$(OBJS)\advlib_commandlinkbutton.o \
 	$(OBJS)\advlib_notifmsg.o \
 	$(OBJS)\advlib_sound.o \
 	$(OBJS)\advlib_taskbar.o \
@@ -7920,6 +7936,11 @@ $(OBJS)\monodll_calctrlg.o: ../../src/generic/calctrlg.cpp
 	$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
 endif
 
+ifeq ($(USE_GUI),1)
+$(OBJS)\monodll_commandlinkbuttong.o: ../../src/generic/commandlinkbuttong.cpp
+	$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
+endif
+
 ifeq ($(USE_GUI),1)
 $(OBJS)\monodll_datavgen.o: ../../src/generic/datavgen.cpp
 	$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
@@ -8015,6 +8036,11 @@ $(OBJS)\monodll_aboutdlg.o: ../../src/msw/aboutdlg.cpp
 	$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
 endif
 
+ifeq ($(USE_GUI),1)
+$(OBJS)\monodll_commandlinkbutton.o: ../../src/msw/commandlinkbutton.cpp
+	$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
+endif
+
 ifeq ($(USE_GUI),1)
 $(OBJS)\monodll_notifmsg.o: ../../src/msw/notifmsg.cpp
 	$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
@@ -10127,6 +10153,11 @@ $(OBJS)\monolib_calctrlg.o: ../../src/generic/calctrlg.cpp
 	$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
 endif
 
+ifeq ($(USE_GUI),1)
+$(OBJS)\monolib_commandlinkbuttong.o: ../../src/generic/commandlinkbuttong.cpp
+	$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
+endif
+
 ifeq ($(USE_GUI),1)
 $(OBJS)\monolib_datavgen.o: ../../src/generic/datavgen.cpp
 	$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
@@ -10222,6 +10253,11 @@ $(OBJS)\monolib_aboutdlg.o: ../../src/msw/aboutdlg.cpp
 	$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
 endif
 
+ifeq ($(USE_GUI),1)
+$(OBJS)\monolib_commandlinkbutton.o: ../../src/msw/commandlinkbutton.cpp
+	$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
+endif
+
 ifeq ($(USE_GUI),1)
 $(OBJS)\monolib_notifmsg.o: ../../src/msw/notifmsg.cpp
 	$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
@@ -13636,6 +13672,9 @@ $(OBJS)\advdll_bmpcboxg.o: ../../src/generic/bmpcboxg.cpp
 $(OBJS)\advdll_calctrlg.o: ../../src/generic/calctrlg.cpp
 	$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
 
+$(OBJS)\advdll_commandlinkbuttong.o: ../../src/generic/commandlinkbuttong.cpp
+	$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
+
 $(OBJS)\advdll_datavgen.o: ../../src/generic/datavgen.cpp
 	$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
 
@@ -13693,6 +13732,9 @@ $(OBJS)\advdll_taskbarcmn.o: ../../src/common/taskbarcmn.cpp
 $(OBJS)\advdll_aboutdlg.o: ../../src/msw/aboutdlg.cpp
 	$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
 
+$(OBJS)\advdll_commandlinkbutton.o: ../../src/msw/commandlinkbutton.cpp
+	$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
+
 $(OBJS)\advdll_notifmsg.o: ../../src/msw/notifmsg.cpp
 	$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
 
@@ -13747,6 +13789,9 @@ $(OBJS)\advlib_bmpcboxg.o: ../../src/generic/bmpcboxg.cpp
 $(OBJS)\advlib_calctrlg.o: ../../src/generic/calctrlg.cpp
 	$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
 
+$(OBJS)\advlib_commandlinkbuttong.o: ../../src/generic/commandlinkbuttong.cpp
+	$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
+
 $(OBJS)\advlib_datavgen.o: ../../src/generic/datavgen.cpp
 	$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
 
@@ -13804,6 +13849,9 @@ $(OBJS)\advlib_taskbarcmn.o: ../../src/common/taskbarcmn.cpp
 $(OBJS)\advlib_aboutdlg.o: ../../src/msw/aboutdlg.cpp
 	$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
 
+$(OBJS)\advlib_commandlinkbutton.o: ../../src/msw/commandlinkbutton.cpp
+	$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
+
 $(OBJS)\advlib_notifmsg.o: ../../src/msw/notifmsg.cpp
 	$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
 
diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc
index 369fffb449..ea143c4a2a 100644
--- a/build/msw/makefile.vc
+++ b/build/msw/makefile.vc
@@ -1709,7 +1709,7 @@ __RUNTIME_LIBS_100 = D
 !if "$(RUNTIME_LIBS)" == "static"
 __RUNTIME_LIBS_100 = $(__THREADSFLAG)
 !endif
-!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1"
+!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1"
 __wxscintilla_usingdll_p = /DWXUSINGDLL
 !endif
 !if "$(MONOLITHIC)" == "0"
@@ -2378,6 +2378,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
 	$(OBJS)\monodll_aboutdlgg.obj \
 	$(OBJS)\monodll_bmpcboxg.obj \
 	$(OBJS)\monodll_calctrlg.obj \
+	$(OBJS)\monodll_commandlinkbuttong.obj \
 	$(OBJS)\monodll_datavgen.obj \
 	$(OBJS)\monodll_datectlg.obj \
 	$(OBJS)\monodll_editlbox.obj \
@@ -2397,6 +2398,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
 	$(OBJS)\monodll_wizard.obj \
 	$(OBJS)\monodll_taskbarcmn.obj \
 	$(OBJS)\monodll_aboutdlg.obj \
+	$(OBJS)\monodll_commandlinkbutton.obj \
 	$(OBJS)\monodll_notifmsg.obj \
 	$(OBJS)\monodll_sound.obj \
 	$(OBJS)\monodll_taskbar.obj \
@@ -2417,6 +2419,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
 	$(OBJS)\monodll_aboutdlgg.obj \
 	$(OBJS)\monodll_bmpcboxg.obj \
 	$(OBJS)\monodll_calctrlg.obj \
+	$(OBJS)\monodll_commandlinkbuttong.obj \
 	$(OBJS)\monodll_datavgen.obj \
 	$(OBJS)\monodll_datectlg.obj \
 	$(OBJS)\monodll_editlbox.obj \
@@ -2436,6 +2439,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
 	$(OBJS)\monodll_wizard.obj \
 	$(OBJS)\monodll_taskbarcmn.obj \
 	$(OBJS)\monodll_aboutdlg.obj \
+	$(OBJS)\monodll_commandlinkbutton.obj \
 	$(OBJS)\monodll_notifmsg.obj \
 	$(OBJS)\monodll_sound.obj \
 	$(OBJS)\monodll_taskbar.obj \
@@ -3093,6 +3097,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
 	$(OBJS)\monolib_aboutdlgg.obj \
 	$(OBJS)\monolib_bmpcboxg.obj \
 	$(OBJS)\monolib_calctrlg.obj \
+	$(OBJS)\monolib_commandlinkbuttong.obj \
 	$(OBJS)\monolib_datavgen.obj \
 	$(OBJS)\monolib_datectlg.obj \
 	$(OBJS)\monolib_editlbox.obj \
@@ -3112,6 +3117,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
 	$(OBJS)\monolib_wizard.obj \
 	$(OBJS)\monolib_taskbarcmn.obj \
 	$(OBJS)\monolib_aboutdlg.obj \
+	$(OBJS)\monolib_commandlinkbutton.obj \
 	$(OBJS)\monolib_notifmsg.obj \
 	$(OBJS)\monolib_sound.obj \
 	$(OBJS)\monolib_taskbar.obj \
@@ -3132,6 +3138,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
 	$(OBJS)\monolib_aboutdlgg.obj \
 	$(OBJS)\monolib_bmpcboxg.obj \
 	$(OBJS)\monolib_calctrlg.obj \
+	$(OBJS)\monolib_commandlinkbuttong.obj \
 	$(OBJS)\monolib_datavgen.obj \
 	$(OBJS)\monolib_datectlg.obj \
 	$(OBJS)\monolib_editlbox.obj \
@@ -3151,6 +3158,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
 	$(OBJS)\monolib_wizard.obj \
 	$(OBJS)\monolib_taskbarcmn.obj \
 	$(OBJS)\monolib_aboutdlg.obj \
+	$(OBJS)\monolib_commandlinkbutton.obj \
 	$(OBJS)\monolib_notifmsg.obj \
 	$(OBJS)\monolib_sound.obj \
 	$(OBJS)\monolib_taskbar.obj \
@@ -4291,6 +4299,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
 	$(OBJS)\advdll_aboutdlgg.obj \
 	$(OBJS)\advdll_bmpcboxg.obj \
 	$(OBJS)\advdll_calctrlg.obj \
+	$(OBJS)\advdll_commandlinkbuttong.obj \
 	$(OBJS)\advdll_datavgen.obj \
 	$(OBJS)\advdll_datectlg.obj \
 	$(OBJS)\advdll_editlbox.obj \
@@ -4310,6 +4319,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
 	$(OBJS)\advdll_wizard.obj \
 	$(OBJS)\advdll_taskbarcmn.obj \
 	$(OBJS)\advdll_aboutdlg.obj \
+	$(OBJS)\advdll_commandlinkbutton.obj \
 	$(OBJS)\advdll_notifmsg.obj \
 	$(OBJS)\advdll_sound.obj \
 	$(OBJS)\advdll_taskbar.obj \
@@ -4330,6 +4340,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
 	$(OBJS)\advdll_aboutdlgg.obj \
 	$(OBJS)\advdll_bmpcboxg.obj \
 	$(OBJS)\advdll_calctrlg.obj \
+	$(OBJS)\advdll_commandlinkbuttong.obj \
 	$(OBJS)\advdll_datavgen.obj \
 	$(OBJS)\advdll_datectlg.obj \
 	$(OBJS)\advdll_editlbox.obj \
@@ -4349,6 +4360,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
 	$(OBJS)\advdll_wizard.obj \
 	$(OBJS)\advdll_taskbarcmn.obj \
 	$(OBJS)\advdll_aboutdlg.obj \
+	$(OBJS)\advdll_commandlinkbutton.obj \
 	$(OBJS)\advdll_notifmsg.obj \
 	$(OBJS)\advdll_sound.obj \
 	$(OBJS)\advdll_taskbar.obj \
@@ -4375,6 +4387,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
 	$(OBJS)\advlib_aboutdlgg.obj \
 	$(OBJS)\advlib_bmpcboxg.obj \
 	$(OBJS)\advlib_calctrlg.obj \
+	$(OBJS)\advlib_commandlinkbuttong.obj \
 	$(OBJS)\advlib_datavgen.obj \
 	$(OBJS)\advlib_datectlg.obj \
 	$(OBJS)\advlib_editlbox.obj \
@@ -4394,6 +4407,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
 	$(OBJS)\advlib_wizard.obj \
 	$(OBJS)\advlib_taskbarcmn.obj \
 	$(OBJS)\advlib_aboutdlg.obj \
+	$(OBJS)\advlib_commandlinkbutton.obj \
 	$(OBJS)\advlib_notifmsg.obj \
 	$(OBJS)\advlib_sound.obj \
 	$(OBJS)\advlib_taskbar.obj \
@@ -4414,6 +4428,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
 	$(OBJS)\advlib_aboutdlgg.obj \
 	$(OBJS)\advlib_bmpcboxg.obj \
 	$(OBJS)\advlib_calctrlg.obj \
+	$(OBJS)\advlib_commandlinkbuttong.obj \
 	$(OBJS)\advlib_datavgen.obj \
 	$(OBJS)\advlib_datectlg.obj \
 	$(OBJS)\advlib_editlbox.obj \
@@ -4433,6 +4448,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
 	$(OBJS)\advlib_wizard.obj \
 	$(OBJS)\advlib_taskbarcmn.obj \
 	$(OBJS)\advlib_aboutdlg.obj \
+	$(OBJS)\advlib_commandlinkbutton.obj \
 	$(OBJS)\advlib_notifmsg.obj \
 	$(OBJS)\advlib_sound.obj \
 	$(OBJS)\advlib_taskbar.obj \
@@ -8350,6 +8366,11 @@ $(OBJS)\monodll_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
 !endif
 
+!if "$(USE_GUI)" == "1"
+$(OBJS)\monodll_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp
+	$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp
+!endif
+
 !if "$(USE_GUI)" == "1"
 $(OBJS)\monodll_datavgen.obj: ..\..\src\generic\datavgen.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\datavgen.cpp
@@ -8445,6 +8466,11 @@ $(OBJS)\monodll_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp
 !endif
 
+!if "$(USE_GUI)" == "1"
+$(OBJS)\monodll_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp
+	$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp
+!endif
+
 !if "$(USE_GUI)" == "1"
 $(OBJS)\monodll_notifmsg.obj: ..\..\src\msw\notifmsg.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\notifmsg.cpp
@@ -10557,6 +10583,11 @@ $(OBJS)\monolib_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
 !endif
 
+!if "$(USE_GUI)" == "1"
+$(OBJS)\monolib_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp
+	$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp
+!endif
+
 !if "$(USE_GUI)" == "1"
 $(OBJS)\monolib_datavgen.obj: ..\..\src\generic\datavgen.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\datavgen.cpp
@@ -10652,6 +10683,11 @@ $(OBJS)\monolib_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp
 !endif
 
+!if "$(USE_GUI)" == "1"
+$(OBJS)\monolib_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp
+	$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp
+!endif
+
 !if "$(USE_GUI)" == "1"
 $(OBJS)\monolib_notifmsg.obj: ..\..\src\msw\notifmsg.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\notifmsg.cpp
@@ -14066,6 +14102,9 @@ $(OBJS)\advdll_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp
 $(OBJS)\advdll_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
 
+$(OBJS)\advdll_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp
+	$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp
+
 $(OBJS)\advdll_datavgen.obj: ..\..\src\generic\datavgen.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\datavgen.cpp
 
@@ -14123,6 +14162,9 @@ $(OBJS)\advdll_taskbarcmn.obj: ..\..\src\common\taskbarcmn.cpp
 $(OBJS)\advdll_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp
 
+$(OBJS)\advdll_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp
+	$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp
+
 $(OBJS)\advdll_notifmsg.obj: ..\..\src\msw\notifmsg.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\notifmsg.cpp
 
@@ -14177,6 +14219,9 @@ $(OBJS)\advlib_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp
 $(OBJS)\advlib_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
 
+$(OBJS)\advlib_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp
+	$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp
+
 $(OBJS)\advlib_datavgen.obj: ..\..\src\generic\datavgen.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\datavgen.cpp
 
@@ -14234,6 +14279,9 @@ $(OBJS)\advlib_taskbarcmn.obj: ..\..\src\common\taskbarcmn.cpp
 $(OBJS)\advlib_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp
 
+$(OBJS)\advlib_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp
+	$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp
+
 $(OBJS)\advlib_notifmsg.obj: ..\..\src\msw\notifmsg.cpp
 	$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\notifmsg.cpp
 
diff --git a/build/msw/makefile.wat b/build/msw/makefile.wat
index c9befbc142..131834e02b 100644
--- a/build/msw/makefile.wat
+++ b/build/msw/makefile.wat
@@ -81,11 +81,11 @@ __wxtiff___depname =
 __wxtiff___depname = $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib
 !endif
 __wxscintilla_usingdll_p =
-!ifeq MONOLITHIC 0
+!ifeq MONOLITHIC 0
 !ifeq SHARED 1
 __wxscintilla_usingdll_p = -dWXUSINGDLL
 !endif
-!endif
+!endif
 EXTRALIBS_FOR_BASE =
 !ifeq MONOLITHIC 0
 EXTRALIBS_FOR_BASE = 
@@ -745,6 +745,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  &
 	$(OBJS)\monodll_aboutdlgg.obj &
 	$(OBJS)\monodll_bmpcboxg.obj &
 	$(OBJS)\monodll_calctrlg.obj &
+	$(OBJS)\monodll_commandlinkbuttong.obj &
 	$(OBJS)\monodll_datavgen.obj &
 	$(OBJS)\monodll_datectlg.obj &
 	$(OBJS)\monodll_editlbox.obj &
@@ -764,6 +765,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  &
 	$(OBJS)\monodll_wizard.obj &
 	$(OBJS)\monodll_taskbarcmn.obj &
 	$(OBJS)\monodll_aboutdlg.obj &
+	$(OBJS)\monodll_commandlinkbutton.obj &
 	$(OBJS)\monodll_notifmsg.obj &
 	$(OBJS)\monodll_sound.obj &
 	$(OBJS)\monodll_taskbar.obj &
@@ -784,6 +786,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  &
 	$(OBJS)\monodll_aboutdlgg.obj &
 	$(OBJS)\monodll_bmpcboxg.obj &
 	$(OBJS)\monodll_calctrlg.obj &
+	$(OBJS)\monodll_commandlinkbuttong.obj &
 	$(OBJS)\monodll_datavgen.obj &
 	$(OBJS)\monodll_datectlg.obj &
 	$(OBJS)\monodll_editlbox.obj &
@@ -803,6 +806,7 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  &
 	$(OBJS)\monodll_wizard.obj &
 	$(OBJS)\monodll_taskbarcmn.obj &
 	$(OBJS)\monodll_aboutdlg.obj &
+	$(OBJS)\monodll_commandlinkbutton.obj &
 	$(OBJS)\monodll_notifmsg.obj &
 	$(OBJS)\monodll_sound.obj &
 	$(OBJS)\monodll_taskbar.obj &
@@ -1465,6 +1469,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  &
 	$(OBJS)\monolib_aboutdlgg.obj &
 	$(OBJS)\monolib_bmpcboxg.obj &
 	$(OBJS)\monolib_calctrlg.obj &
+	$(OBJS)\monolib_commandlinkbuttong.obj &
 	$(OBJS)\monolib_datavgen.obj &
 	$(OBJS)\monolib_datectlg.obj &
 	$(OBJS)\monolib_editlbox.obj &
@@ -1484,6 +1489,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  &
 	$(OBJS)\monolib_wizard.obj &
 	$(OBJS)\monolib_taskbarcmn.obj &
 	$(OBJS)\monolib_aboutdlg.obj &
+	$(OBJS)\monolib_commandlinkbutton.obj &
 	$(OBJS)\monolib_notifmsg.obj &
 	$(OBJS)\monolib_sound.obj &
 	$(OBJS)\monolib_taskbar.obj &
@@ -1504,6 +1510,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  &
 	$(OBJS)\monolib_aboutdlgg.obj &
 	$(OBJS)\monolib_bmpcboxg.obj &
 	$(OBJS)\monolib_calctrlg.obj &
+	$(OBJS)\monolib_commandlinkbuttong.obj &
 	$(OBJS)\monolib_datavgen.obj &
 	$(OBJS)\monolib_datectlg.obj &
 	$(OBJS)\monolib_editlbox.obj &
@@ -1523,6 +1530,7 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  &
 	$(OBJS)\monolib_wizard.obj &
 	$(OBJS)\monolib_taskbarcmn.obj &
 	$(OBJS)\monolib_aboutdlg.obj &
+	$(OBJS)\monolib_commandlinkbutton.obj &
 	$(OBJS)\monolib_notifmsg.obj &
 	$(OBJS)\monolib_sound.obj &
 	$(OBJS)\monolib_taskbar.obj &
@@ -2617,6 +2625,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  &
 	$(OBJS)\advdll_aboutdlgg.obj &
 	$(OBJS)\advdll_bmpcboxg.obj &
 	$(OBJS)\advdll_calctrlg.obj &
+	$(OBJS)\advdll_commandlinkbuttong.obj &
 	$(OBJS)\advdll_datavgen.obj &
 	$(OBJS)\advdll_datectlg.obj &
 	$(OBJS)\advdll_editlbox.obj &
@@ -2636,6 +2645,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  &
 	$(OBJS)\advdll_wizard.obj &
 	$(OBJS)\advdll_taskbarcmn.obj &
 	$(OBJS)\advdll_aboutdlg.obj &
+	$(OBJS)\advdll_commandlinkbutton.obj &
 	$(OBJS)\advdll_notifmsg.obj &
 	$(OBJS)\advdll_sound.obj &
 	$(OBJS)\advdll_taskbar.obj &
@@ -2656,6 +2666,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  &
 	$(OBJS)\advdll_aboutdlgg.obj &
 	$(OBJS)\advdll_bmpcboxg.obj &
 	$(OBJS)\advdll_calctrlg.obj &
+	$(OBJS)\advdll_commandlinkbuttong.obj &
 	$(OBJS)\advdll_datavgen.obj &
 	$(OBJS)\advdll_datectlg.obj &
 	$(OBJS)\advdll_editlbox.obj &
@@ -2675,6 +2686,7 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  &
 	$(OBJS)\advdll_wizard.obj &
 	$(OBJS)\advdll_taskbarcmn.obj &
 	$(OBJS)\advdll_aboutdlg.obj &
+	$(OBJS)\advdll_commandlinkbutton.obj &
 	$(OBJS)\advdll_notifmsg.obj &
 	$(OBJS)\advdll_sound.obj &
 	$(OBJS)\advdll_taskbar.obj &
@@ -2701,6 +2713,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  &
 	$(OBJS)\advlib_aboutdlgg.obj &
 	$(OBJS)\advlib_bmpcboxg.obj &
 	$(OBJS)\advlib_calctrlg.obj &
+	$(OBJS)\advlib_commandlinkbuttong.obj &
 	$(OBJS)\advlib_datavgen.obj &
 	$(OBJS)\advlib_datectlg.obj &
 	$(OBJS)\advlib_editlbox.obj &
@@ -2720,6 +2733,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  &
 	$(OBJS)\advlib_wizard.obj &
 	$(OBJS)\advlib_taskbarcmn.obj &
 	$(OBJS)\advlib_aboutdlg.obj &
+	$(OBJS)\advlib_commandlinkbutton.obj &
 	$(OBJS)\advlib_notifmsg.obj &
 	$(OBJS)\advlib_sound.obj &
 	$(OBJS)\advlib_taskbar.obj &
@@ -2740,6 +2754,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  &
 	$(OBJS)\advlib_aboutdlgg.obj &
 	$(OBJS)\advlib_bmpcboxg.obj &
 	$(OBJS)\advlib_calctrlg.obj &
+	$(OBJS)\advlib_commandlinkbuttong.obj &
 	$(OBJS)\advlib_datavgen.obj &
 	$(OBJS)\advlib_datectlg.obj &
 	$(OBJS)\advlib_editlbox.obj &
@@ -2759,6 +2774,7 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  &
 	$(OBJS)\advlib_wizard.obj &
 	$(OBJS)\advlib_taskbarcmn.obj &
 	$(OBJS)\advlib_aboutdlg.obj &
+	$(OBJS)\advlib_commandlinkbutton.obj &
 	$(OBJS)\advlib_notifmsg.obj &
 	$(OBJS)\advlib_sound.obj &
 	$(OBJS)\advlib_taskbar.obj &
@@ -8179,6 +8195,11 @@ $(OBJS)\monodll_calctrlg.obj :  .AUTODEPEND ..\..\src\generic\calctrlg.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
 !endif
 
+!ifeq USE_GUI 1
+$(OBJS)\monodll_commandlinkbuttong.obj :  .AUTODEPEND ..\..\src\generic\commandlinkbuttong.cpp
+	$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
+!endif
+
 !ifeq USE_GUI 1
 $(OBJS)\monodll_datavgen.obj :  .AUTODEPEND ..\..\src\generic\datavgen.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
@@ -8274,6 +8295,11 @@ $(OBJS)\monodll_aboutdlg.obj :  .AUTODEPEND ..\..\src\msw\aboutdlg.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
 !endif
 
+!ifeq USE_GUI 1
+$(OBJS)\monodll_commandlinkbutton.obj :  .AUTODEPEND ..\..\src\msw\commandlinkbutton.cpp
+	$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
+!endif
+
 !ifeq USE_GUI 1
 $(OBJS)\monodll_notifmsg.obj :  .AUTODEPEND ..\..\src\msw\notifmsg.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
@@ -10386,6 +10412,11 @@ $(OBJS)\monolib_calctrlg.obj :  .AUTODEPEND ..\..\src\generic\calctrlg.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
 !endif
 
+!ifeq USE_GUI 1
+$(OBJS)\monolib_commandlinkbuttong.obj :  .AUTODEPEND ..\..\src\generic\commandlinkbuttong.cpp
+	$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
+!endif
+
 !ifeq USE_GUI 1
 $(OBJS)\monolib_datavgen.obj :  .AUTODEPEND ..\..\src\generic\datavgen.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
@@ -10481,6 +10512,11 @@ $(OBJS)\monolib_aboutdlg.obj :  .AUTODEPEND ..\..\src\msw\aboutdlg.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
 !endif
 
+!ifeq USE_GUI 1
+$(OBJS)\monolib_commandlinkbutton.obj :  .AUTODEPEND ..\..\src\msw\commandlinkbutton.cpp
+	$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
+!endif
+
 !ifeq USE_GUI 1
 $(OBJS)\monolib_notifmsg.obj :  .AUTODEPEND ..\..\src\msw\notifmsg.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
@@ -13895,6 +13931,9 @@ $(OBJS)\advdll_bmpcboxg.obj :  .AUTODEPEND ..\..\src\generic\bmpcboxg.cpp
 $(OBJS)\advdll_calctrlg.obj :  .AUTODEPEND ..\..\src\generic\calctrlg.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
 
+$(OBJS)\advdll_commandlinkbuttong.obj :  .AUTODEPEND ..\..\src\generic\commandlinkbuttong.cpp
+	$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
+
 $(OBJS)\advdll_datavgen.obj :  .AUTODEPEND ..\..\src\generic\datavgen.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
 
@@ -13952,6 +13991,9 @@ $(OBJS)\advdll_taskbarcmn.obj :  .AUTODEPEND ..\..\src\common\taskbarcmn.cpp
 $(OBJS)\advdll_aboutdlg.obj :  .AUTODEPEND ..\..\src\msw\aboutdlg.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
 
+$(OBJS)\advdll_commandlinkbutton.obj :  .AUTODEPEND ..\..\src\msw\commandlinkbutton.cpp
+	$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
+
 $(OBJS)\advdll_notifmsg.obj :  .AUTODEPEND ..\..\src\msw\notifmsg.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
 
@@ -14006,6 +14048,9 @@ $(OBJS)\advlib_bmpcboxg.obj :  .AUTODEPEND ..\..\src\generic\bmpcboxg.cpp
 $(OBJS)\advlib_calctrlg.obj :  .AUTODEPEND ..\..\src\generic\calctrlg.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
 
+$(OBJS)\advlib_commandlinkbuttong.obj :  .AUTODEPEND ..\..\src\generic\commandlinkbuttong.cpp
+	$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
+
 $(OBJS)\advlib_datavgen.obj :  .AUTODEPEND ..\..\src\generic\datavgen.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
 
@@ -14063,6 +14108,9 @@ $(OBJS)\advlib_taskbarcmn.obj :  .AUTODEPEND ..\..\src\common\taskbarcmn.cpp
 $(OBJS)\advlib_aboutdlg.obj :  .AUTODEPEND ..\..\src\msw\aboutdlg.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
 
+$(OBJS)\advlib_commandlinkbutton.obj :  .AUTODEPEND ..\..\src\msw\commandlinkbutton.cpp
+	$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
+
 $(OBJS)\advlib_notifmsg.obj :  .AUTODEPEND ..\..\src\msw\notifmsg.cpp
 	$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
 
diff --git a/build/msw/wx_adv.dsp b/build/msw/wx_adv.dsp
index 55661d290b..c71409f04c 100644
--- a/build/msw/wx_adv.dsp
+++ b/build/msw/wx_adv.dsp
@@ -352,6 +352,10 @@ SOURCE=..\..\src\msw\calctrl.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\src\msw\commandlinkbutton.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\src\msw\datecontrols.cpp
 
 !IF  "$(CFG)" == "adv - Win32 DLL Universal Release"
@@ -493,6 +497,10 @@ SOURCE=..\..\src\generic\calctrlg.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\src\generic\commandlinkbuttong.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\src\generic\datavgen.cpp
 # End Source File
 # Begin Source File
@@ -719,6 +727,10 @@ SOURCE=..\..\include\wx\msw\calctrl.h
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\include\wx\msw\commandlinkbutton.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\include\wx\msw\datectrl.h
 # End Source File
 # Begin Source File
@@ -930,6 +942,10 @@ SOURCE=..\..\include\wx\calctrl.h
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\include\wx\commandlinkbutton.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\include\wx\dataview.h
 # End Source File
 # Begin Source File
diff --git a/build/msw/wx_core.dsp b/build/msw/wx_core.dsp
index 674ce09b3b..d41130effd 100644
--- a/build/msw/wx_core.dsp
+++ b/build/msw/wx_core.dsp
@@ -4835,6 +4835,10 @@ SOURCE=..\..\include\wx\msw\combobox.h
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\include\wx\msw\commandlinkbutton.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\include\wx\msw\control.h
 # End Source File
 # Begin Source File
@@ -5894,6 +5898,10 @@ SOURCE=..\..\include\wx\combobox.h
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\include\wx\commandlinkbutton.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\include\wx\control.h
 # End Source File
 # Begin Source File
diff --git a/build/msw/wx_vc7_adv.vcproj b/build/msw/wx_vc7_adv.vcproj
index d34f298a06..9617ea40be 100644
--- a/build/msw/wx_vc7_adv.vcproj
+++ b/build/msw/wx_vc7_adv.vcproj
@@ -634,6 +634,9 @@
 					Name="DLL Universal Release|Win32"
 					ExcludedFromBuild="TRUE"/>
 			</File>
+			<File
+				RelativePath="..\..\src\msw\commandlinkbutton.cpp">
+			</File>
 			<File
 				RelativePath="..\..\src\msw\datecontrols.cpp">
 				<FileConfiguration
@@ -707,6 +710,9 @@
 			<File
 				RelativePath="..\..\src\generic\calctrlg.cpp">
 			</File>
+			<File
+				RelativePath="..\..\src\generic\commandlinkbuttong.cpp">
+			</File>
 			<File
 				RelativePath="..\..\src\generic\datavgen.cpp">
 			</File>
@@ -866,6 +872,9 @@
 			<File
 				RelativePath="..\..\include\wx\msw\calctrl.h">
 			</File>
+			<File
+				RelativePath="..\..\include\wx\msw\commandlinkbutton.h">
+			</File>
 			<File
 				RelativePath="..\..\include\wx\msw\datectrl.h">
 			</File>
@@ -1036,6 +1045,9 @@
 			<File
 				RelativePath="..\..\include\wx\calctrl.h">
 			</File>
+			<File
+				RelativePath="..\..\include\wx\commandlinkbutton.h">
+			</File>
 			<File
 				RelativePath="..\..\include\wx\dataview.h">
 			</File>
diff --git a/build/msw/wx_vc7_core.vcproj b/build/msw/wx_vc7_core.vcproj
index d1260756b3..0399e32239 100644
--- a/build/msw/wx_vc7_core.vcproj
+++ b/build/msw/wx_vc7_core.vcproj
@@ -4218,6 +4218,9 @@
 			<File
 				RelativePath="..\..\include\wx\msw\combobox.h">
 			</File>
+			<File
+				RelativePath="..\..\include\wx\msw\commandlinkbutton.h">
+			</File>
 			<File
 				RelativePath="..\..\include\wx\msw\control.h">
 			</File>
@@ -5026,6 +5029,9 @@
 			<File
 				RelativePath="..\..\include\wx\combobox.h">
 			</File>
+			<File
+				RelativePath="..\..\include\wx\commandlinkbutton.h">
+			</File>
 			<File
 				RelativePath="..\..\include\wx\control.h">
 			</File>
diff --git a/build/msw/wx_vc8_adv.vcproj b/build/msw/wx_vc8_adv.vcproj
index 3ae2af9244..1771ca1ca8 100644
--- a/build/msw/wx_vc8_adv.vcproj
+++ b/build/msw/wx_vc8_adv.vcproj
@@ -879,6 +879,10 @@
 					ExcludedFromBuild="true"
 				/>
 			</File>
+			<File
+				RelativePath="..\..\src\msw\commandlinkbutton.cpp"
+				>
+			</File>
 			<File
 				RelativePath="..\..\src\msw\datecontrols.cpp"
 				>
@@ -976,6 +980,10 @@
 				RelativePath="..\..\src\generic\calctrlg.cpp"
 				>
 			</File>
+			<File
+				RelativePath="..\..\src\generic\commandlinkbuttong.cpp"
+				>
+			</File>
 			<File
 				RelativePath="..\..\src\generic\datavgen.cpp"
 				>
@@ -1182,6 +1190,10 @@
 				RelativePath="..\..\include\wx\msw\calctrl.h"
 				>
 			</File>
+			<File
+				RelativePath="..\..\include\wx\msw\commandlinkbutton.h"
+				>
+			</File>
 			<File
 				RelativePath="..\..\include\wx\msw\datectrl.h"
 				>
@@ -1400,6 +1412,10 @@
 				RelativePath="..\..\include\wx\calctrl.h"
 				>
 			</File>
+			<File
+				RelativePath="..\..\include\wx\commandlinkbutton.h"
+				>
+			</File>
 			<File
 				RelativePath="..\..\include\wx\dataview.h"
 				>
diff --git a/build/msw/wx_vc8_core.vcproj b/build/msw/wx_vc8_core.vcproj
index 170a28c179..27042f1f7c 100644
--- a/build/msw/wx_vc8_core.vcproj
+++ b/build/msw/wx_vc8_core.vcproj
@@ -5651,6 +5651,10 @@
 				RelativePath="..\..\include\wx\msw\combobox.h"
 				>
 			</File>
+			<File
+				RelativePath="..\..\include\wx\msw\commandlinkbutton.h"
+				>
+			</File>
 			<File
 				RelativePath="..\..\include\wx\msw\control.h"
 				>
@@ -6719,6 +6723,10 @@
 				RelativePath="..\..\include\wx\combobox.h"
 				>
 			</File>
+			<File
+				RelativePath="..\..\include\wx\commandlinkbutton.h"
+				>
+			</File>
 			<File
 				RelativePath="..\..\include\wx\control.h"
 				>
diff --git a/build/msw/wx_vc9_adv.vcproj b/build/msw/wx_vc9_adv.vcproj
index b86357cccf..340e1479d8 100644
--- a/build/msw/wx_vc9_adv.vcproj
+++ b/build/msw/wx_vc9_adv.vcproj
@@ -875,6 +875,10 @@
 					ExcludedFromBuild="true"
 				/>
 			</File>
+			<File
+				RelativePath="..\..\src\msw\commandlinkbutton.cpp"
+				>
+			</File>
 			<File
 				RelativePath="..\..\src\msw\datecontrols.cpp"
 				>
@@ -972,6 +976,10 @@
 				RelativePath="..\..\src\generic\calctrlg.cpp"
 				>
 			</File>
+			<File
+				RelativePath="..\..\src\generic\commandlinkbuttong.cpp"
+				>
+			</File>
 			<File
 				RelativePath="..\..\src\generic\datavgen.cpp"
 				>
@@ -1178,6 +1186,10 @@
 				RelativePath="..\..\include\wx\msw\calctrl.h"
 				>
 			</File>
+			<File
+				RelativePath="..\..\include\wx\msw\commandlinkbutton.h"
+				>
+			</File>
 			<File
 				RelativePath="..\..\include\wx\msw\datectrl.h"
 				>
@@ -1396,6 +1408,10 @@
 				RelativePath="..\..\include\wx\calctrl.h"
 				>
 			</File>
+			<File
+				RelativePath="..\..\include\wx\commandlinkbutton.h"
+				>
+			</File>
 			<File
 				RelativePath="..\..\include\wx\dataview.h"
 				>
diff --git a/build/msw/wx_vc9_core.vcproj b/build/msw/wx_vc9_core.vcproj
index 9bc8c8b193..4a79a85eea 100644
--- a/build/msw/wx_vc9_core.vcproj
+++ b/build/msw/wx_vc9_core.vcproj
@@ -5647,6 +5647,10 @@
 				RelativePath="..\..\include\wx\msw\combobox.h"
 				>
 			</File>
+			<File
+				RelativePath="..\..\include\wx\msw\commandlinkbutton.h"
+				>
+			</File>
 			<File
 				RelativePath="..\..\include\wx\msw\control.h"
 				>
@@ -6715,6 +6719,10 @@
 				RelativePath="..\..\include\wx\combobox.h"
 				>
 			</File>
+			<File
+				RelativePath="..\..\include\wx\commandlinkbutton.h"
+				>
+			</File>
 			<File
 				RelativePath="..\..\include\wx\control.h"
 				>
diff --git a/configure b/configure
index 634446cb34..835353aab4 100755
--- a/configure
+++ b/configure
@@ -1818,6 +1818,7 @@ Optional Features:
   --enable-colourpicker   use wxColourPickerCtrl class
   --enable-combobox       use wxComboBox class
   --enable-comboctrl      use wxComboCtrl class
+  --enable-commandlinkbutton      use wxCommmandLinkButton class
   --enable-dataviewctrl   use wxDataViewCtrl class
   --enable-datepick       use wxDatePickerCtrl class
   --enable-detect_sm      use code to detect X11 session manager
@@ -9738,6 +9739,7 @@ if test "$wxUSE_CONTROLS" = "no"; then
     DEFAULT_wxUSE_COLOURPICKERCTRL=no
     DEFAULT_wxUSE_COMBOBOX=no
     DEFAULT_wxUSE_COMBOBOX=no
+    DEFAULT_wxUSE_COMMANDLINKBUTTON=no
     DEFAULT_wxUSE_DATAVIEWCTRL=no
     DEFAULT_wxUSE_DATEPICKCTRL=no
     DEFAULT_wxUSE_DETECT_SM=no
@@ -10441,6 +10443,50 @@ fi
 echo "${ECHO_T}$result" >&6; }
 
 
+          enablestring=
+          defaultval=$wxUSE_ALL_FEATURES
+          if test -z "$defaultval"; then
+              if test x"$enablestring" = xdisable; then
+                  defaultval=yes
+              else
+                  defaultval=no
+              fi
+          fi
+
+          { echo "$as_me:$LINENO: checking for --${enablestring:-enable}-commandlinkbutton" >&5
+echo $ECHO_N "checking for --${enablestring:-enable}-commandlinkbutton... $ECHO_C" >&6; }
+          # Check whether --enable-commandlinkbutton was given.
+if test "${enable_commandlinkbutton+set}" = set; then
+  enableval=$enable_commandlinkbutton;
+                          if test "$enableval" = yes; then
+                            wx_cv_use_commandlinkbutton='wxUSE_COMMANDLINKBUTTON=yes'
+                          else
+                            wx_cv_use_commandlinkbutton='wxUSE_COMMANDLINKBUTTON=no'
+                          fi
+
+else
+
+                          wx_cv_use_commandlinkbutton='wxUSE_COMMANDLINKBUTTON=${'DEFAULT_wxUSE_COMMANDLINKBUTTON":-$defaultval}"
+
+fi
+
+
+          eval "$wx_cv_use_commandlinkbutton"
+
+          if test x"$enablestring" = xdisable; then
+            if test $wxUSE_COMMANDLINKBUTTON = no; then
+              result=yes
+            else
+              result=no
+            fi
+          else
+            result=$wxUSE_COMMANDLINKBUTTON
+          fi
+
+          { echo "$as_me:$LINENO: result: $result" >&5
+echo "${ECHO_T}$result" >&6; }
+
+
           enablestring=
           defaultval=$wxUSE_ALL_FEATURES
           if test -z "$defaultval"; then
@@ -46890,6 +46936,14 @@ _ACEOF
   USES_CONTROLS=1
 fi
 
+if test "$wxUSE_COMMANDLINKBUTTON" = "yes"; then
+  cat >>confdefs.h <<\_ACEOF
+#define wxUSE_COMMANDLINKBUTTON 1
+_ACEOF
+
+  USES_CONTROLS=1
+fi
+
 if test "$wxUSE_CHOICE" = "yes"; then
   cat >>confdefs.h <<\_ACEOF
 #define wxUSE_CHOICE 1
diff --git a/configure.in b/configure.in
index b8617a503e..dbe9b500cd 100644
--- a/configure.in
+++ b/configure.in
@@ -877,6 +877,7 @@ if test "$wxUSE_CONTROLS" = "no"; then
     DEFAULT_wxUSE_COLOURPICKERCTRL=no
     DEFAULT_wxUSE_COMBOBOX=no
     DEFAULT_wxUSE_COMBOBOX=no
+    DEFAULT_wxUSE_COMMANDLINKBUTTON=no
     DEFAULT_wxUSE_DATAVIEWCTRL=no
     DEFAULT_wxUSE_DATEPICKCTRL=no
     DEFAULT_wxUSE_DETECT_SM=no
@@ -935,6 +936,7 @@ WX_ARG_FEATURE(collpane,    [  --enable-collpane       use wxCollapsiblePane cla
 WX_ARG_FEATURE(colourpicker,[  --enable-colourpicker   use wxColourPickerCtrl class], wxUSE_COLOURPICKERCTRL)
 WX_ARG_FEATURE(combobox,    [  --enable-combobox       use wxComboBox class], wxUSE_COMBOBOX)
 WX_ARG_FEATURE(comboctrl,   [  --enable-comboctrl      use wxComboCtrl class], wxUSE_COMBOCTRL)
+WX_ARG_FEATURE(commandlinkbutton, [  --enable-commandlinkbutton      use wxCommmandLinkButton class], wxUSE_COMMANDLINKBUTTON)
 WX_ARG_FEATURE(dataviewctrl,[  --enable-dataviewctrl   use wxDataViewCtrl class], wxUSE_DATAVIEWCTRL)
 WX_ARG_FEATURE(datepick,    [  --enable-datepick       use wxDatePickerCtrl class], wxUSE_DATEPICKCTRL)
 WX_ARG_FEATURE(detect_sm,   [  --enable-detect_sm      use code to detect X11 session manager], wxUSE_DETECT_SM)
@@ -6804,6 +6806,11 @@ if test "$wxUSE_COMBOCTRL" = "yes"; then
   USES_CONTROLS=1
 fi
 
+if test "$wxUSE_COMMANDLINKBUTTON" = "yes"; then
+  AC_DEFINE(wxUSE_COMMANDLINKBUTTON)
+  USES_CONTROLS=1
+fi
+
 if test "$wxUSE_CHOICE" = "yes"; then
   AC_DEFINE(wxUSE_CHOICE)
   USES_CONTROLS=1
diff --git a/docs/changes.txt b/docs/changes.txt
index f43e582e44..d7dc3c373f 100644
--- a/docs/changes.txt
+++ b/docs/changes.txt
@@ -411,6 +411,7 @@ MSW:
 
 All (GUI):
 
+- Added wxCommandLinkButton (Rickard Westerlund, GSoC 2010 project).
 - wxAUI: support auto-orientable toolbars (wsu).
 - Added wxDataViewCtrl::Set/GetCurrentItem().
 - wxHTML: render in RTL order inside RTL window (Richard Bullington-McGuire).
diff --git a/docs/doxygen/images/wxgtk/commandlinkbutton.png b/docs/doxygen/images/wxgtk/commandlinkbutton.png
new file mode 100644
index 0000000000000000000000000000000000000000..30ecc28fe78540aaba0a5bcb90cdd9fba574a985
GIT binary patch
literal 4761
zcmV;K5@zj*P)<h;3K|Lk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gyJ<SA%p
zULM?=-Q0XGSi>^5wCOP_iW=Ju9UEjm9r{<<W<V=k!TuU3$U}L^Jt%9%4erd%NmWM*
zDpbx({osD6`0EHuMFi1vZC?9nNhB5e|2Xb{Es2!$TmRQ00sS9i{y(m59PG8IX>=!%
zP0)i3v0X`IZZBxc7Ad$M>6y_~=y!k&dtN}Ic?2%?!MDOz{Q)xt%1A1z@Bb#VIccY6
p+@S8L6aqNBlotnzK??k)u*^JK(lTo^xcL(SnyR``l(JpSe*l?!f!6>4

literal 0
HcmV?d00001

diff --git a/include/wx/chkconf.h b/include/wx/chkconf.h
index fac9e0e10b..7603663aa8 100644
--- a/include/wx/chkconf.h
+++ b/include/wx/chkconf.h
@@ -547,6 +547,14 @@
 #   endif
 #endif /* !defined(wxUSE_COMBOBOX) */
 
+#ifndef wxUSE_COMMANDLINKBUTTON
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_COMMANDLINKBUTTON must be defined, please read comment near the top of this file."
+#   else
+#       define wxUSE_COMMANDLINKBUTTON 0
+#   endif
+#endif /* !defined(wxUSE_COMMANDLINKBUTTON) */
+
 #ifndef wxUSE_COMBOCTRL
 #   ifdef wxABORT_ON_CONFIG_ERROR
 #       error "wxUSE_COMBOCTRL must be defined, please read comment near the top of this file."
@@ -1425,6 +1433,17 @@
 #    endif
 #endif /* wxUSE_BMPBUTTON */
 
+#if wxUSE_COMMANDLINKBUTTON
+#    if !wxUSE_BUTTON
+#        ifdef wxABORT_ON_CONFIG_ERROR
+#            error "wxUSE_COMMANDLINKBUTTON requires wxUSE_BUTTON"
+#        else
+#            undef wxUSE_BUTTON
+#            define wxUSE_BUTTON 1
+#        endif
+#    endif
+#endif /* wxUSE_COMMANDLINKBUTTON */
+
 /*
    wxUSE_BOOKCTRL should be only used if any of the controls deriving from it
    are used
diff --git a/include/wx/commandlinkbutton.h b/include/wx/commandlinkbutton.h
new file mode 100644
index 0000000000..9f1a52eba6
--- /dev/null
+++ b/include/wx/commandlinkbutton.h
@@ -0,0 +1,168 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        wx/commandlinkbutton.h
+// Purpose:     wxCommandLinkButtonBase and wxGenericCommandLinkButton classes
+// Author:      Rickard Westerlund
+// Created:     2010-06-11
+// RCS-ID:      $Id$
+// Copyright:   (c) 2010 wxWidgets team
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_COMMANDLINKBUTTON_H_
+#define _WX_COMMANDLINKBUTTON_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_COMMANDLINKBUTTON
+
+// ----------------------------------------------------------------------------
+// Command link button common base class
+// ----------------------------------------------------------------------------
+
+// This class has separate "main label" (title-like string) and (possibly
+// multiline) "note" which can be set and queried separately but can also be
+// set both at once by joining them with a new line and setting them as a
+// label and queried by breaking the label into the parts before the first new
+// line and after it.
+
+class WXDLLIMPEXP_ADV wxCommandLinkButtonBase : public wxButton
+{
+public:
+    wxCommandLinkButtonBase() : wxButton() { }
+
+    wxCommandLinkButtonBase(wxWindow *parent,
+                            wxWindowID id,
+                            const wxString& mainLabel = wxEmptyString,
+                            const wxString& note = wxEmptyString,
+                            const wxPoint& pos = wxDefaultPosition,
+                            const wxSize& size = wxDefaultSize,
+                            long style = 0,
+                            const wxValidator& validator =
+                                wxDefaultValidator,
+                            const wxString& name = wxButtonNameStr)
+        : wxButton(parent,
+                   id,
+                   mainLabel + '\n' + note,
+                   pos,
+                   size,
+                   style,
+                   validator,
+                   name)
+        { }
+
+    virtual void SetMainLabelAndNote(const wxString& mainLabel,
+                                     const wxString& note) = 0;
+
+    virtual void SetMainLabel(const wxString& mainLabel)
+    {
+        SetMainLabelAndNote(mainLabel, GetNote());
+    }
+
+    virtual void SetNote(const wxString& note)
+    {
+        SetMainLabelAndNote(GetMainLabel(), note);
+    }
+
+    virtual wxString GetMainLabel() const
+    {
+        return GetLabel().BeforeFirst('\n');
+    }
+
+    virtual wxString GetNote() const
+    {
+        return GetLabel().AfterFirst('\n');
+    }
+
+protected:
+    virtual bool HasNativeBitmap() const { return false; }
+
+private:
+    wxDECLARE_NO_COPY_CLASS(wxCommandLinkButtonBase);
+};
+
+// ----------------------------------------------------------------------------
+// Generic command link button
+// ----------------------------------------------------------------------------
+
+// Trivial generic implementation simply using a multiline label to show both
+// the main label and the note.
+
+class WXDLLIMPEXP_ADV wxGenericCommandLinkButton
+                      : public wxCommandLinkButtonBase
+{
+public:
+    wxGenericCommandLinkButton() : wxCommandLinkButtonBase() { }
+
+
+    wxGenericCommandLinkButton(wxWindow *parent,
+                               wxWindowID id,
+                               const wxString& mainLabel = wxEmptyString,
+                               const wxString& note = wxEmptyString,
+                               const wxPoint& pos = wxDefaultPosition,
+                               const wxSize& size = wxDefaultSize,
+                               long style = 0,
+                               const wxValidator& validator = wxDefaultValidator,
+                               const wxString& name = wxButtonNameStr)
+        : wxCommandLinkButtonBase()
+    {
+        Create(parent, id, mainLabel, note, pos, size, style, validator, name);
+    }
+
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxString& mainLabel = wxEmptyString,
+                const wxString& note = wxEmptyString,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxButtonNameStr);
+
+    virtual void SetMainLabelAndNote(const wxString& mainLabel,
+                                     const wxString& note)
+    {
+        wxButton::SetLabel(mainLabel + '\n' + note);
+    }
+
+private:
+    void SetDefaultBitmap();
+
+    wxDECLARE_NO_COPY_CLASS(wxGenericCommandLinkButton);
+};
+
+#if defined(__WXMSW__)
+    #include "wx/msw/commandlinkbutton.h"
+#else
+    class WXDLLIMPEXP_ADV wxCommandLinkButton : public wxGenericCommandLinkButton
+    {
+    public:
+        wxCommandLinkButton() : wxGenericCommandLinkButton() { }
+
+        wxCommandLinkButton(wxWindow *parent,
+                            wxWindowID id,
+                            const wxString& mainLabel = wxEmptyString,
+                            const wxString& note = wxEmptyString,
+                            const wxPoint& pos = wxDefaultPosition,
+                            const wxSize& size = wxDefaultSize,
+                            long style = 0,
+                            const wxValidator& validator = wxDefaultValidator,
+                            const wxString& name = wxButtonNameStr)
+            : wxGenericCommandLinkButton(parent,
+                                         id,
+                                         mainLabel,
+                                         note,
+                                         pos,
+                                         size,
+                                         style,
+                                         validator,
+                                         name)
+            { }
+
+    private:
+        wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxCommandLinkButton);
+    };
+#endif // __WXMSW__/!__WXMSW__
+
+#endif // wxUSE_COMMANDLINKBUTTON
+
+#endif // _WX_COMMANDLINKBUTTON_H_
diff --git a/include/wx/motif/setup0.h b/include/wx/motif/setup0.h
index c0b6859ddf..76b436545f 100644
--- a/include/wx/motif/setup0.h
+++ b/include/wx/motif/setup0.h
@@ -736,6 +736,7 @@
 #define wxUSE_COLLPANE      1   // wxCollapsiblePane
 #define wxUSE_COLOURPICKERCTRL 1    // wxColourPickerCtrl
 #define wxUSE_COMBOBOX      1   // wxComboBox
+#define wxUSE_COMMANDLINKBUTTON 1   // wxCommandLinkButton
 #define wxUSE_DATAVIEWCTRL  1   // wxDataViewCtrl
 #define wxUSE_DATEPICKCTRL  1   // wxDatePickerCtrl
 #define wxUSE_DIRPICKERCTRL 1   // wxDirPickerCtrl
diff --git a/include/wx/msw/button.h b/include/wx/msw/button.h
index e1de60c2d6..1f5ad27c9b 100644
--- a/include/wx/msw/button.h
+++ b/include/wx/msw/button.h
@@ -88,13 +88,17 @@ protected:
     virtual void DoSetBitmapMargins(wxCoord x, wxCoord y);
     virtual void DoSetBitmapPosition(wxDirection dir);
 
+    // Increases the passed in size if necessary to account for the
+    // button image, if any
+    void AdjustForBitmapSize(wxSize& size) const;
+
     class wxButtonImageData *m_imageData;
 
     // true if the UAC symbol is shown
     bool m_authNeeded;
 
 private:
-    DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton)
+    wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxButton);
 };
 
 #endif // _WX_BUTTON_H_
diff --git a/include/wx/msw/commandlinkbutton.h b/include/wx/msw/commandlinkbutton.h
new file mode 100644
index 0000000000..c7a6f5a851
--- /dev/null
+++ b/include/wx/msw/commandlinkbutton.h
@@ -0,0 +1,74 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        wx/msw/commandlinkbutton.h
+// Purpose:     wxCommandLinkButton class
+// Author:      Rickard Westerlund
+// Created:     2010-06-11
+// RCS-ID:      $Id$
+// Copyright:   (c) 2010 wxWidgets team
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_MSW_COMMANDLINKBUTTON_H_
+#define _WX_MSW_COMMANDLINKBUTTON_H_
+
+// ----------------------------------------------------------------------------
+// Command link button for wxMSW
+// ----------------------------------------------------------------------------
+
+// Derive from the generic version to be able to fall back to it during
+// run-time if the command link buttons are not supported by the system we're
+// running under.
+
+class WXDLLIMPEXP_ADV wxCommandLinkButton : public wxGenericCommandLinkButton
+{
+public:
+    wxCommandLinkButton () : wxGenericCommandLinkButton() { }
+
+    wxCommandLinkButton(wxWindow *parent,
+                        wxWindowID id,
+                        const wxString& mainLabel = wxEmptyString,
+                        const wxString& note = wxEmptyString,
+                        const wxPoint& pos = wxDefaultPosition,
+                        const wxSize& size = wxDefaultSize,
+                        long style = 0,
+                        const wxValidator& validator = wxDefaultValidator,
+                        const wxString& name = wxButtonNameStr)
+        : wxGenericCommandLinkButton()
+    {
+        Create(parent, id, mainLabel, note, pos, size, style, validator, name);
+    }
+
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxString& mainLabel = wxEmptyString,
+                const wxString& note = wxEmptyString,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxButtonNameStr);
+
+    // overridden base class methods
+    // -----------------------------
+
+    // do the same thing as in the generic case here
+    virtual void SetLabel(const wxString& label)
+    {
+        SetMainLabelAndNote(label.BeforeFirst('\n'), label.AfterFirst('\n'));
+    }
+
+    virtual void SetMainLabelAndNote(const wxString& mainLabel,
+                                     const wxString& note);
+
+    virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+
+protected:
+    virtual wxSize DoGetBestSize() const;
+
+    virtual bool HasNativeBitmap() const;
+
+private:
+    wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxCommandLinkButton);
+};
+
+#endif // _WX_MSW_COMMANDLINKBUTTON_H_
diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h
index c43c311be5..eff307a202 100644
--- a/include/wx/msw/setup0.h
+++ b/include/wx/msw/setup0.h
@@ -736,6 +736,7 @@
 #define wxUSE_COLLPANE      1   // wxCollapsiblePane
 #define wxUSE_COLOURPICKERCTRL 1    // wxColourPickerCtrl
 #define wxUSE_COMBOBOX      1   // wxComboBox
+#define wxUSE_COMMANDLINKBUTTON 1   // wxCommandLinkButton
 #define wxUSE_DATAVIEWCTRL  1   // wxDataViewCtrl
 #define wxUSE_DATEPICKCTRL  1   // wxDatePickerCtrl
 #define wxUSE_DIRPICKERCTRL 1   // wxDirPickerCtrl
diff --git a/include/wx/msw/wince/setup.h b/include/wx/msw/wince/setup.h
index 1051aa20ba..52cca1d4f4 100644
--- a/include/wx/msw/wince/setup.h
+++ b/include/wx/msw/wince/setup.h
@@ -736,6 +736,7 @@
 #define wxUSE_COLLPANE      1   // wxCollapsiblePane
 #define wxUSE_COLOURPICKERCTRL 1    // wxColourPickerCtrl
 #define wxUSE_COMBOBOX      1   // wxComboBox
+#define wxUSE_COMMANDLINKBUTTON 1   // wxCommandLinkButton
 #define wxUSE_DATAVIEWCTRL  1   // wxDataViewCtrl
 #define wxUSE_DATEPICKCTRL  1   // wxDatePickerCtrl
 #define wxUSE_DIRPICKERCTRL 1   // wxDirPickerCtrl
diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h
index 8631562b17..e13174a23c 100644
--- a/include/wx/os2/setup0.h
+++ b/include/wx/os2/setup0.h
@@ -736,6 +736,7 @@
 #define wxUSE_COLLPANE      1   // wxCollapsiblePane
 #define wxUSE_COLOURPICKERCTRL 1    // wxColourPickerCtrl
 #define wxUSE_COMBOBOX      1   // wxComboBox
+#define wxUSE_COMMANDLINKBUTTON 1   // wxCommandLinkButton
 #define wxUSE_DATAVIEWCTRL  1   // wxDataViewCtrl
 #define wxUSE_DATEPICKCTRL  1   // wxDatePickerCtrl
 #define wxUSE_DIRPICKERCTRL 1   // wxDirPickerCtrl
diff --git a/include/wx/osx/setup0.h b/include/wx/osx/setup0.h
index 1016abdbb8..6561837cdb 100644
--- a/include/wx/osx/setup0.h
+++ b/include/wx/osx/setup0.h
@@ -737,6 +737,7 @@
 #define wxUSE_COLLPANE      1   // wxCollapsiblePane
 #define wxUSE_COLOURPICKERCTRL 1    // wxColourPickerCtrl
 #define wxUSE_COMBOBOX      1   // wxComboBox
+#define wxUSE_COMMANDLINKBUTTON 1   // wxCommandLinkButton
 #define wxUSE_DATAVIEWCTRL  1   // wxDataViewCtrl
 #define wxUSE_DATEPICKCTRL  1   // wxDatePickerCtrl
 #define wxUSE_DIRPICKERCTRL 1   // wxDirPickerCtrl
diff --git a/include/wx/palmos/setup0.h b/include/wx/palmos/setup0.h
index 9199976d6d..6fe0162e83 100644
--- a/include/wx/palmos/setup0.h
+++ b/include/wx/palmos/setup0.h
@@ -736,6 +736,7 @@
 #define wxUSE_COLLPANE      1   // wxCollapsiblePane
 #define wxUSE_COLOURPICKERCTRL 1    // wxColourPickerCtrl
 #define wxUSE_COMBOBOX      1   // wxComboBox
+#define wxUSE_COMMANDLINKBUTTON 1   // wxCommandLinkButton
 #define wxUSE_DATAVIEWCTRL  1   // wxDataViewCtrl
 #define wxUSE_DATEPICKCTRL  1   // wxDatePickerCtrl
 #define wxUSE_DIRPICKERCTRL 1   // wxDirPickerCtrl
diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h
index a043c93e51..18fa4a2341 100644
--- a/include/wx/setup_inc.h
+++ b/include/wx/setup_inc.h
@@ -732,6 +732,7 @@
 #define wxUSE_COLLPANE      1   // wxCollapsiblePane
 #define wxUSE_COLOURPICKERCTRL 1    // wxColourPickerCtrl
 #define wxUSE_COMBOBOX      1   // wxComboBox
+#define wxUSE_COMMANDLINKBUTTON 1   // wxCommandLinkButton
 #define wxUSE_DATAVIEWCTRL  1   // wxDataViewCtrl
 #define wxUSE_DATEPICKCTRL  1   // wxDatePickerCtrl
 #define wxUSE_DIRPICKERCTRL 1   // wxDirPickerCtrl
diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h
index 3e2c207de9..81558bd7c3 100644
--- a/include/wx/univ/setup0.h
+++ b/include/wx/univ/setup0.h
@@ -735,6 +735,7 @@
 #define wxUSE_COLLPANE      1   // wxCollapsiblePane
 #define wxUSE_COLOURPICKERCTRL 1    // wxColourPickerCtrl
 #define wxUSE_COMBOBOX      1   // wxComboBox
+#define wxUSE_COMMANDLINKBUTTON 1   // wxCommandLinkButton
 #define wxUSE_DATAVIEWCTRL  1   // wxDataViewCtrl
 #define wxUSE_DATEPICKCTRL  1   // wxDatePickerCtrl
 #define wxUSE_DIRPICKERCTRL 1   // wxDirPickerCtrl
diff --git a/interface/wx/commandlinkbutton.h b/interface/wx/commandlinkbutton.h
new file mode 100644
index 0000000000..96ebf5cffc
--- /dev/null
+++ b/interface/wx/commandlinkbutton.h
@@ -0,0 +1,173 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        wx/commandlinkbutton.h
+// Purpose:     interface of wxCommandLinkButton
+// Author:      wxWidgets team
+// RCS-ID:      $Id$
+// Licence:     wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+    @class wxCommandLinkButton
+
+    Objects of this class are similar in appearance to the normal wxButtons but
+    to the links in a web page in functionality.
+
+    Pressing such button usually results in switching to another window of the
+    program and so they can be used as a replacement for the "Next" button in a
+    multi-page dialog (such as wxWizard), for example.
+
+    Their advantage compared to the ordinary wxButtons is that they emphasize
+    the action of switching the window and also that they allow to give more
+    detailed explanation to the user because, in addition to the short button
+    label, they also show a longer description string.
+
+    The short, title-like, part of the label is called the <em>main label</em>
+    and the longer description is the <em>note</em>. Both of them can be set
+    and queried independently using wxCommandLinkButton-specific methods such
+    as SetMainLabel() or GetNote() or also via SetLabel() and GetLabel()
+    methods inherited from wxButton. When using the latter, the main label and
+    the note are concatenated into a single string using a new line character
+    between them (notice that the note part can have more new lines in it).
+
+    wxCommandLinkButton generates the same event as wxButton but doesn't
+    support any of wxButton-specific styles nor adds any new styles of its own.
+
+    Currently this class uses native implementation under Windows Vista and
+    later versions and a generic implementation for the other platforms and
+    earlier Windows versions.
+
+    @since 2.9.2
+
+    @library{wxadv}
+    @category{ctrl}
+    @appearance{commandlinkbutton.png}
+
+    @see wxButton, wxBitmapButton
+*/
+class wxCommandLinkButton : public wxButton
+{
+public:
+    /**
+        Default constructor.
+
+        Use Create() to really create the control.
+    */
+    wxCommandLinkButton();
+
+    /**
+        Constructor really creating a command Link button.
+
+        The button will be decorated with stock icons under GTK+ 2.
+
+        @param parent
+            Parent window. Must not be @NULL.
+        @param id
+            Button identifier. A value of wxID_ANY indicates a default value.
+        @param mainLabel
+            First line of text on the button, typically the label of an action
+            that will be made when the button is pressed.
+        @param note
+            Second line of text describing the action performed when the button
+            is pressed.
+        @param pos
+            Button position.
+        @param size
+            Button size. If the default size is specified then the button is sized
+            appropriately for the text.
+        @param style
+            Window style. See wxButton class description.
+        @param validator
+            Window validator.
+        @param name
+            Window name.
+
+        @see Create(), wxValidator
+    */
+    wxCommandLinkButton(wxWindow* parent, wxWindowID id,
+                        const wxString& mainLabel = wxEmptyString,
+                        const wxString& note = wxEmptyString,
+                        const wxPoint& pos = wxDefaultPosition,
+                        const wxSize& size = wxDefaultSize,
+                        long style = 0,
+                        const wxValidator& validator = wxDefaultValidator,
+                        const wxString& name = wxButtonNameStr);
+
+    /**
+        Button creation function for two-step creation.
+        For more details, see wxCommandLinkButton().
+    */
+    bool Create(wxWindow* parent, wxWindowID id,
+                const wxString& mainLabel = wxEmptyString,
+                const wxString& note = wxEmptyString,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxButtonNameStr);
+
+    /**
+        Sets a new main label and note for the button.
+
+        Neither of the arguments can be empty, if you need to change just the
+        label or just the note, use SetMainLabel() or SetNote() instead of this
+        function.
+
+        @param mainLabel
+            New main label to use.
+        @param note
+            New note to use.
+    */
+    void SetMainLabelAndNote(const wxString& mainLabel, const wxString& note);
+
+    /**
+        Sets the string label and note for the button.
+
+        @param label
+            The label and note to set, with the two separated
+            by the first newline or none to set a blank note.
+    */
+    virtual void SetLabel(const wxString& label);
+
+    /**
+        Returns the string label for the button.
+
+        @see SetLabel()
+
+        @return
+            A string with the main label and note concatenated
+            together with a newline separating them.
+    */
+    wxString GetLabel() const;
+
+    /**
+        Changes the main label.
+
+        @param mainLabel
+            New main label to use.
+    */
+    void SetMainLabel(const wxString& mainLabel);
+
+    /**
+        Changes the note.
+
+        @param note
+            New note to use.
+    */
+    void SetNote(const wxString& note);
+
+    /**
+        Returns the current main label.
+
+        @return
+            Main label currently displayed.
+    */
+    wxString GetMainLabel() const;
+
+    /**
+        Returns the currently used note.
+
+        @return
+            Note currently displayed.
+    */
+    wxString GetNote() const;
+};
diff --git a/samples/widgets/button.cpp b/samples/widgets/button.cpp
index 9885a4811f..2c685e42ca 100644
--- a/samples/widgets/button.cpp
+++ b/samples/widgets/button.cpp
@@ -40,6 +40,7 @@
 #include "wx/artprov.h"
 #include "wx/sizer.h"
 #include "wx/dcmemory.h"
+#include "wx/commandlinkbutton.h"
 
 #include "widgets.h"
 
@@ -54,6 +55,7 @@ enum
 {
     ButtonPage_Reset = wxID_HIGHEST,
     ButtonPage_ChangeLabel,
+    ButtonPage_ChangeNote,
     ButtonPage_Button
 };
 
@@ -103,6 +105,7 @@ protected:
     void OnButton(wxCommandEvent& event);
     void OnButtonReset(wxCommandEvent& event);
     void OnButtonChangeLabel(wxCommandEvent& event);
+    void OnButtonChangeNote(wxCommandEvent& event);
 
     // reset the wxButton parameters
     void Reset();
@@ -125,6 +128,7 @@ protected:
                *m_chkTextAndBitmap,
                *m_chkFit,
                *m_chkAuthNeeded,
+               *m_chkCommandLink,
                *m_chkDefault;
 
     // more checkboxes for wxBitmapButton only
@@ -141,11 +145,24 @@ protected:
 
     // the button itself and the sizer it is in
     wxButton *m_button;
+
+#if wxUSE_COMMANDLINKBUTTON
+    // same as m_button or NULL if not showing a command link button currently
+    wxCommandLinkButton *m_cmdLnkButton;
+#endif // wxUSE_COMMANDLINKBUTTON
+
     wxSizer *m_sizerButton;
 
     // the text entries for command parameters
     wxTextCtrl *m_textLabel;
 
+#if wxUSE_COMMANDLINKBUTTON
+    wxTextCtrl *m_textNote;
+
+    // used to hide or show button for changing note
+    wxSizer *m_sizerNote;
+#endif // wxUSE_COMMANDLINKBUTTON
+
 private:
     DECLARE_EVENT_TABLE()
     DECLARE_WIDGETS_PAGE(ButtonWidgetsPage)
@@ -160,6 +177,7 @@ BEGIN_EVENT_TABLE(ButtonWidgetsPage, WidgetsPage)
 
     EVT_BUTTON(ButtonPage_Reset, ButtonWidgetsPage::OnButtonReset)
     EVT_BUTTON(ButtonPage_ChangeLabel, ButtonWidgetsPage::OnButtonChangeLabel)
+    EVT_BUTTON(ButtonPage_ChangeNote, ButtonWidgetsPage::OnButtonChangeNote)
 
     EVT_CHECKBOX(wxID_ANY, ButtonWidgetsPage::OnCheckOrRadioBox)
     EVT_RADIOBOX(wxID_ANY, ButtonWidgetsPage::OnCheckOrRadioBox)
@@ -186,6 +204,7 @@ ButtonWidgetsPage::ButtonWidgetsPage(WidgetsBookCtrl *book,
     m_chkTextAndBitmap =
     m_chkFit =
     m_chkAuthNeeded =
+    m_chkCommandLink =
     m_chkDefault =
     m_chkUsePressed =
     m_chkUseFocused =
@@ -215,6 +234,9 @@ void ButtonWidgetsPage::CreateContent()
     m_chkTextAndBitmap = CreateCheckBoxAndAddToSizer(sizerLeft, "Text &and bitmap");
     m_chkFit = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Fit exactly"));
     m_chkAuthNeeded = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("Require a&uth"));
+#if wxUSE_COMMANDLINKBUTTON
+    m_chkCommandLink = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("Use command &link button"));
+#endif
     m_chkDefault = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Default"));
 
     sizerLeft->AddSpacer(5);
@@ -283,9 +305,18 @@ void ButtonWidgetsPage::CreateContent()
                                                      wxID_ANY,
                                                      &m_textLabel);
     m_textLabel->SetValue(wxT("&Press me!"));
-
     sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
 
+#if wxUSE_COMMANDLINKBUTTON
+    m_sizerNote = CreateSizerWithTextAndButton(ButtonPage_ChangeNote,
+                                               wxT("Change note"),
+                                               wxID_ANY,
+                                               &m_textNote);
+    m_textNote->SetValue(wxT("Writes down button clicks in the log."));
+
+    sizerMiddle->Add(m_sizerNote, 0, wxALL | wxGROW, 5);
+#endif
+
     // right pane
     m_sizerButton = new wxBoxSizer(wxHORIZONTAL);
     m_sizerButton->SetMinSize(150, 0);
@@ -313,6 +344,9 @@ void ButtonWidgetsPage::Reset()
     m_chkAuthNeeded->SetValue(false);
     m_chkTextAndBitmap->SetValue(false);
     m_chkDefault->SetValue(false);
+#if wxUSE_COMMANDLINKBUTTON
+    m_chkCommandLink->SetValue(false);
+#endif
 
     m_chkUsePressed->SetValue(true);
     m_chkUseFocused->SetValue(true);
@@ -329,7 +363,12 @@ void ButtonWidgetsPage::CreateButton()
     wxString label;
     if ( m_button )
     {
-        label = m_button->GetLabel();
+#if wxUSE_COMMANDLINKBUTTON
+        if ( m_cmdLnkButton )
+            label = m_cmdLnkButton->GetMainLabel();
+        else
+#endif
+            label = m_button->GetLabel();
 
         size_t count = m_sizerButton->GetChildren().GetCount();
         for ( size_t n = 0; n < count; n++ )
@@ -385,6 +424,10 @@ void ButtonWidgetsPage::CreateButton()
             break;
     }
 
+#if wxUSE_COMMANDLINKBUTTON
+    m_sizerNote->Show(m_chkCommandLink->GetValue());
+#endif
+
     bool showsBitmap = false;
     if ( m_chkBitmapOnly->GetValue() )
     {
@@ -401,12 +444,32 @@ void ButtonWidgetsPage::CreateButton()
         if ( m_chkUseDisabled->GetValue() )
             bbtn->SetBitmapDisabled(CreateBitmap(wxT("disabled")));
         m_button = bbtn;
+#if wxUSE_COMMANDLINKBUTTON
+        m_cmdLnkButton = NULL;
+#endif
     }
     else // normal button
     {
-        m_button = new wxButton(this, ButtonPage_Button, label,
-                                wxDefaultPosition, wxDefaultSize,
-                                flags);
+#if wxUSE_COMMANDLINKBUTTON
+        m_cmdLnkButton = NULL;
+
+        if ( m_chkCommandLink->GetValue() )
+        {
+            m_cmdLnkButton = new wxCommandLinkButton(this, ButtonPage_Button,
+                                                     label,
+                                                     m_textNote->GetValue(),
+                                                     wxDefaultPosition,
+                                                     wxDefaultSize,
+                                                     flags);
+            m_button = m_cmdLnkButton;
+        }
+        else
+#endif // wxUSE_COMMANDLINKBUTTON
+        {
+            m_button = new wxButton(this, ButtonPage_Button, label,
+                                    wxDefaultPosition, wxDefaultSize,
+                                    flags);
+        }
     }
 
     if ( !showsBitmap && m_chkTextAndBitmap->GetValue() )
@@ -475,13 +538,28 @@ void ButtonWidgetsPage::OnButtonReset(wxCommandEvent& WXUNUSED(event))
 void ButtonWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
 {
     CreateButton();
+    Layout(); // make sure the text field for changing note displays correctly.
 }
 
 void ButtonWidgetsPage::OnButtonChangeLabel(wxCommandEvent& WXUNUSED(event))
 {
-    m_button->SetLabel(m_textLabel->GetValue());
+#if wxUSE_COMMANDLINKBUTTON
+    if ( m_cmdLnkButton )
+        m_cmdLnkButton->SetMainLabel(m_textLabel->GetValue());
+    else
+#endif // wxUSE_COMMANDLINKBUTTON
+        m_button->SetLabel(m_textLabel->GetValue());
+
+    m_sizerButton->Layout();
+}
+
+void ButtonWidgetsPage::OnButtonChangeNote(wxCommandEvent& WXUNUSED(event))
+{
+#if wxUSE_COMMANDLINKBUTTON
+    m_cmdLnkButton->SetNote(m_textNote->GetValue());
 
     m_sizerButton->Layout();
+#endif // wxUSE_COMMANDLINKBUTTON
 }
 
 void ButtonWidgetsPage::OnButton(wxCommandEvent& WXUNUSED(event))
diff --git a/setup.h.in b/setup.h.in
index 667087f1ed..10e9747520 100644
--- a/setup.h.in
+++ b/setup.h.in
@@ -360,6 +360,7 @@
 #define wxUSE_COLLPANE      0
 #define wxUSE_COLOURPICKERCTRL 0
 #define wxUSE_COMBOBOX      0
+#define wxUSE_COMMANDLINKBUTTON 0
 #define wxUSE_DATAVIEWCTRL  0
 #define wxUSE_DATEPICKCTRL  0
 #define wxUSE_DIRPICKERCTRL 0
diff --git a/src/generic/commandlinkbuttong.cpp b/src/generic/commandlinkbuttong.cpp
new file mode 100644
index 0000000000..2895e970ce
--- /dev/null
+++ b/src/generic/commandlinkbuttong.cpp
@@ -0,0 +1,69 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        src/generic/commandlinkbuttong.cpp
+// Purpose:     wxGenericCommandLinkButton
+// Author:      Rickard Westerlund
+// Created:     2010-06-23
+// RCS-ID:      $Id$
+// Copyright:   (c) 2010 wxWidgets team
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#if wxUSE_COMMANDLINKBUTTON
+
+#include "wx/commandlinkbutton.h"
+#include "wx/artprov.h"
+
+#if wxUSE_EXTENDED_RTTI
+    wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCommandLinkButton, wxButton, "wx/commandlinkbutton.h")
+#else
+    wxIMPLEMENT_DYNAMIC_CLASS(wxCommandLinkButton, wxButton)
+#endif // wxUSE_EXTENDED_RTTI
+
+// ----------------------------------------------------------------------------
+// Generic command link button
+// ----------------------------------------------------------------------------
+
+bool wxGenericCommandLinkButton::Create(wxWindow *parent,
+                                        wxWindowID id,
+                                        const wxString& mainLabel,
+                                        const wxString& note,
+                                        const wxPoint& pos,
+                                        const wxSize& size,
+                                        long style,
+                                        const wxValidator& validator,
+                                        const wxString& name)
+{
+    if ( !wxButton::Create(parent,
+                           id,
+                           mainLabel + '\n' + note,
+                           pos,
+                           size,
+                           style,
+                           validator,
+                           name) )
+        return false;
+
+    if ( !HasNativeBitmap() )
+        SetDefaultBitmap();
+
+    return true;
+
+}
+
+void wxGenericCommandLinkButton::SetDefaultBitmap()
+{
+    SetBitmap(wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_BUTTON));
+}
+
+#endif // wxUSE_COMMANDLINKBUTTON
diff --git a/src/msw/button.cpp b/src/msw/button.cpp
index 0c36af5313..6da658c9b7 100644
--- a/src/msw/button.cpp
+++ b/src/msw/button.cpp
@@ -588,6 +588,71 @@ void wxButton::SetLabel(const wxString& label)
 // size management including autosizing
 // ----------------------------------------------------------------------------
 
+void wxButton::AdjustForBitmapSize(wxSize &size) const
+{
+    if ( !m_imageData )
+        return;
+
+    // account for the bitmap size
+    const wxSize sizeBmp = m_imageData->GetBitmap(State_Normal).GetSize();
+    const wxDirection dirBmp = m_imageData->GetBitmapPosition();
+    if ( dirBmp == wxLEFT || dirBmp == wxRIGHT )
+    {
+        size.x += sizeBmp.x;
+        if ( sizeBmp.y > size.y )
+            size.y = sizeBmp.y;
+    }
+    else // bitmap on top/below the text
+    {
+        size.y += sizeBmp.y;
+        if ( sizeBmp.x > size.x )
+            size.x = sizeBmp.x;
+    }
+
+    // account for the user-specified margins
+    size += 2*m_imageData->GetBitmapMargins();
+
+    // and also for the margins we always add internally (unless we have no
+    // border at all in which case the button has exactly the same size as
+    // bitmap and so no margins should be used)
+    if ( !HasFlag(wxBORDER_NONE) )
+    {
+        int marginH = 0,
+            marginV = 0;
+#if wxUSE_UXTHEME
+        if ( wxUxThemeEngine::GetIfActive() )
+        {
+            wxUxThemeHandle theme(const_cast<wxButton *>(this), L"BUTTON");
+
+            MARGINS margins;
+            wxUxThemeEngine::Get()->GetThemeMargins(theme, NULL,
+                                                    BP_PUSHBUTTON,
+                                                    PBS_NORMAL,
+                                                    TMT_CONTENTMARGINS,
+                                                    NULL,
+                                                    &margins);
+
+            // XP doesn't draw themed buttons correctly when the client
+            // area is smaller than 8x8 - enforce this minimum size for
+            // small bitmaps
+            size.IncTo(wxSize(8, 8));
+
+            marginH = margins.cxLeftWidth + margins.cxRightWidth
+                        + 2*XP_BUTTON_EXTRA_MARGIN;
+            marginV = margins.cyTopHeight + margins.cyBottomHeight
+                        + 2*XP_BUTTON_EXTRA_MARGIN;
+        }
+        else
+#endif // wxUSE_UXTHEME
+        {
+            marginH =
+            marginV = OD_BUTTON_MARGIN;
+        }
+
+        size.IncBy(marginH, marginV);
+    }
+}
+
 wxSize wxButton::DoGetBestSize() const
 {
     wxSize size;
@@ -606,64 +671,7 @@ wxSize wxButton::DoGetBestSize() const
 
     if ( m_imageData )
     {
-        // account for the bitmap size
-        const wxSize sizeBmp = m_imageData->GetBitmap(State_Normal).GetSize();
-        const wxDirection dirBmp = m_imageData->GetBitmapPosition();
-        if ( dirBmp == wxLEFT || dirBmp == wxRIGHT )
-        {
-            size.x += sizeBmp.x;
-            if ( sizeBmp.y > size.y )
-                size.y = sizeBmp.y;
-        }
-        else // bitmap on top/below the text
-        {
-            size.y += sizeBmp.y;
-            if ( sizeBmp.x > size.x )
-                size.x = sizeBmp.x;
-        }
-
-        // account for the user-specified margins
-        size += 2*m_imageData->GetBitmapMargins();
-
-        // and also for the margins we always add internally (unless we have no
-        // border at all in which case the button has exactly the same size as
-        // bitmap and so no margins should be used)
-        if ( !HasFlag(wxBORDER_NONE) )
-        {
-            int marginH = 0,
-                marginV = 0;
-#if wxUSE_UXTHEME
-            if ( wxUxThemeEngine::GetIfActive() )
-            {
-                wxUxThemeHandle theme(const_cast<wxButton *>(this), L"BUTTON");
-
-                MARGINS margins;
-                wxUxThemeEngine::Get()->GetThemeMargins(theme, NULL,
-                                                        BP_PUSHBUTTON,
-                                                        PBS_NORMAL,
-                                                        TMT_CONTENTMARGINS,
-                                                        NULL,
-                                                        &margins);
-
-                // XP doesn't draw themed buttons correctly when the client
-                // area is smaller than 8x8 - enforce this minimum size for
-                // small bitmaps
-                size.IncTo(wxSize(8, 8));
-
-                marginH = margins.cxLeftWidth + margins.cxRightWidth
-                            + 2*XP_BUTTON_EXTRA_MARGIN;
-                marginV = margins.cyTopHeight + margins.cyBottomHeight
-                            + 2*XP_BUTTON_EXTRA_MARGIN;
-            }
-            else
-#endif // wxUSE_UXTHEME
-            {
-                marginH =
-                marginV = OD_BUTTON_MARGIN;
-            }
-
-            size.IncBy(marginH, marginV);
-        }
+        AdjustForBitmapSize(size);
 
         CacheBestSize(size);
     }
diff --git a/src/msw/commandlinkbutton.cpp b/src/msw/commandlinkbutton.cpp
new file mode 100644
index 0000000000..796251439a
--- /dev/null
+++ b/src/msw/commandlinkbutton.cpp
@@ -0,0 +1,203 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        src/msw/commandlinkbutton.cpp
+// Purpose:     wxCommandLinkButton
+// Author:      Rickard Westerlund
+// Created:     2010-06-14
+// RCS-ID:      $Id$
+// Copyright:   (c) 2010 wxWidgets team
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#if wxUSE_COMMANDLINKBUTTON
+
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+    #include "wx/dcclient.h"
+#endif
+
+#include "wx/commandlinkbutton.h"
+#include "wx/msw/private.h"
+#include "wx/msw/private/button.h"
+#include "wx/msw/private/dc.h"
+#include "wx/private/window.h"
+
+#ifndef BCM_SETNOTE
+    #define BCM_SETNOTE 0x1609
+#endif
+
+#ifndef BS_COMMANDLINK
+    #define BS_COMMANDLINK 0xE
+#endif
+
+// ----------------------------------------------------------------------------
+// Helper functions
+// ----------------------------------------------------------------------------
+
+namespace
+{
+
+inline bool HasNativeCommandLinkButton()
+{
+    return wxGetWinVersion() >= wxWinVersion_6;
+}
+
+} // anonymous namespace
+
+// ----------------------------------------------------------------------------
+// Command link button
+// ----------------------------------------------------------------------------
+
+bool wxCommandLinkButton::Create(wxWindow *parent,
+                                 wxWindowID id,
+                                 const wxString& mainLabel,
+                                 const wxString& note,
+                                 const wxPoint& pos,
+                                 const wxSize& size,
+                                 long style,
+                                 const wxValidator& validator,
+                                 const wxString& name)
+{
+    if ( ! wxGenericCommandLinkButton::Create(parent,
+                                              id,
+                                              mainLabel,
+                                              note,
+                                              pos,
+                                              size,
+                                              style,
+                                              validator,
+                                              name) )
+        return false;
+
+    SetMainLabelAndNote(mainLabel, note);
+    SetInitialSize();
+
+    return true;
+}
+
+void
+wxCommandLinkButton::SetMainLabelAndNote(const wxString& mainLabel,
+                                         const wxString& note)
+{
+    if ( HasNativeCommandLinkButton() )
+    {
+        wxButton::SetLabel(mainLabel);
+        ::SendMessage(m_hWnd, BCM_SETNOTE, 0, (LPARAM) note.wx_str());
+
+        // Preserve the user-specified label for GetLabel()
+        m_labelOrig = mainLabel;
+        if ( !note.empty() )
+            m_labelOrig << '\n' << note;
+    }
+    else
+    {
+        wxGenericCommandLinkButton::SetMainLabelAndNote(mainLabel, note);
+    }
+}
+
+WXDWORD wxCommandLinkButton::MSWGetStyle(long style, WXDWORD *exstyle) const
+{
+    WXDWORD ret = wxButton::MSWGetStyle(style, exstyle);
+    if ( HasNativeCommandLinkButton() )
+        ret |= BS_COMMANDLINK;
+
+    return ret;
+}
+
+bool wxCommandLinkButton::HasNativeBitmap() const
+{
+    return HasNativeCommandLinkButton();
+}
+
+// ----------------------------------------------------------------------------
+// size management including autosizing
+// ----------------------------------------------------------------------------
+
+// Margin measures can be found at
+// http://expression.microsoft.com/en-us/ee662150.aspx
+namespace
+{
+    const int MAINLABEL_TOP_MARGIN = 16; // Includes image top margin.
+    const int MAINLABEL_NOTE_LEFT_MARGIN = 23;
+    const int NOTE_TOP_MARGIN = 21;
+    const int NOTE_BOTTOM_MARGIN = 1;
+    const int MAINLABEL_NOTE_MARGIN = NOTE_TOP_MARGIN - MAINLABEL_TOP_MARGIN;
+};
+
+wxSize wxCommandLinkButton::DoGetBestSize() const
+{
+    wxSize size;
+
+    // account for the text part if we have it or if we don't have any image at
+    // all (buttons initially created with empty label should still have a non
+    // zero size)
+    if ( ShowsLabel() || !m_imageData )
+    {
+        int flags = 0;
+        if ( GetAuthNeeded() )
+            flags |= wxMSWButton::Size_AuthNeeded;
+
+        wxCommandLinkButton *thisButton =
+            const_cast<wxCommandLinkButton *>(this);
+        wxClientDC dc(thisButton);
+
+        wxFont noteFont = dc.GetFont();
+
+        // 4/3 is the relationship between main label and note font sizes.
+        dc.SetFont(noteFont.Scaled(4.0f/3.0f));
+        size = dc.GetMultiLineTextExtent(GetLabelText(GetMainLabel()));
+
+        dc.SetFont(noteFont);
+        wxSize noteSize = dc.GetMultiLineTextExtent(GetLabelText(GetNote()));
+
+        if ( noteSize.x > size.x )
+            size.x = noteSize.x;
+        size.y += noteSize.y;
+
+        size = wxMSWButton::GetFittingSize(thisButton,
+                                           size,
+                                           flags);
+
+        // The height of a standard command link button is 25 and 35 DLUs for
+        // single lines and two lines respectively. Width is not accounted for.
+        int heightDef = GetNote().AfterFirst('\n').empty() ? 25 : 35;
+        wxSize sizeDef = thisButton->ConvertDialogToPixels(wxSize(50,
+                                                                  heightDef));
+
+        if ( size.y < sizeDef.y )
+            size.y = sizeDef.y;
+    }
+
+    if ( m_imageData )
+    {
+        AdjustForBitmapSize(size);
+    }
+    else
+    {
+        // The default image size is 16x16.
+        size.x += 16;
+        if ( size.y < 16 )
+            size.y = 16;
+    }
+
+    size.x += MAINLABEL_NOTE_LEFT_MARGIN;
+    size.y += MAINLABEL_TOP_MARGIN + NOTE_BOTTOM_MARGIN;
+    if ( !GetNote().empty() )
+        size.y += MAINLABEL_NOTE_MARGIN;
+
+    CacheBestSize(size);
+
+    return size;
+}
+
+#endif // wxUSE_COMMANDLINKBUTTON
-- 
2.49.0