# Ultimate Toolbox Change History

## Version 9.3 (Update 04)

### Changes and fixes for Unicode builds and docking, as discussed by The Code Project community

While converting a project to Unicode and trying to debug some undesirable docking behavior, a number of issues appeared. This update resolves those issues.

Changes for update 04 include:

- Changes to OXMenuBar.cpp and OXBitmapMenuOrganizer.cpp
  Failing to enclose __FILE__ with _T( ) causes a non unicode string to be output as unicode
- Changes to OxDragDockContext.cpp
  When dragging a docked window into the same bar it currently resides on, it tended to shrink. The updated code preserves its previous size if the destination is the same dock bar.
- OxAdvancedAssert.cpp/OxAdvancedAssert.h
  This code uses Simple MAPI, which does not support UNICODE. As a result of some of the string copies casting directly to a TCHAR, a wide string was passed as an ANSI string. This has now been fixed.
- When building DLL's using VS2005 and later, the correct version of comsuppw.lib is linked via pragma in stdafx.cpp
- When building Unicode DLL versions with VC6, OXWABook.cpp does not compile. The MFC version test has now been updated.

These changes were submitted by Anthony Wieser at Wieser Software Ltd.

## Version 9.3 (Update 03)

### Changes and fixes for 64-bit compilation, as discussed by The Code Project community

The major source file changes referenced in this update should all be annotated with 'v9.3 - update 03' in comments. The scope of these changes is for the most part concerned with issues arising from compilation in 64-bit compilation.

The goal of this update is to enable 64-bit compilation of the core source files, while retaining backward compatibility with VC6, VS2003, and VS2005.

Changes for update 03 include:

- Changes to UTB64Bit.h:
  Macros added targeted at return values and parameter declarations that are now problematic in 64-bit (OnToolHitTest, OnTimer, SendMessageTimeout)
  Updated identifiers used in the GetWindowLongPtr and GetClassLongPtr API calls.
  Redefinitions of PtrToInt, PtrToLong, PtrToUint, PtrToUlong to add cast - (parameters are now void* in 64 bit).
- Many methods throughout the code base were declared substituting LONG, DWORD, UINT, etc in place of LRESULT, WPARAM, and LPARAM and needed some cleanup.
- A few specific function declarations and types were changed in place based on #ifdef _WIN64.
- Compilation of the DAO class files is removed for 64-bit - DAO is not available for Win64 based platforms.
- Compilation of OXSysInfo code is removed, as the Intel CPUInf32 library contains inline assembly which cannot be compiled by the 64-bit VC compilers.
- 64-bit platform configurations were added to the DLL and Static Lib builds for VS2008 - UT2008.sln and UTStaticLib2008.sln. (Note: The JPEG library build will need 64-bit configurations added by the end user).
- Warnings arising in 64-bit compilation have not been suppressed since these changes have not yet been tested.
- The majority of the current sample projects have not been tested against 64-bit - this update addresses only the core source and include files.

Thanks to JRCooper and nick42 for suggestions and testing.

##

## Version 9.3 (Update 02)

### Changes and fixes for VS2008 compatibility, as discussed by The Code Project community

The major source file changes referenced in this update should all be annotated with 'v9.3 update 02' in comments. The scope of these changes is specifically limited to issues arising from compilation in Visual Studio 2008 - remaining Windows Vista related issues are not addressed in this update. Changes include:

- Addition of new project and solution files for the static library and DLL builds:
  UTStaticLib2008.vcproj
  UTStaticLib2008.sln
  UT2008.vcproj
  UT2008.sln
- The latest version of commctrl.h defines TVGN_NEXTSELECTED 0x000B if _WIN32_IE >= 0x0600. Code in OXTreeCtrl.h which defined this as 0x031 is changed to do nothing for IE 6 or higher. File affected:
  OXTreeCtrl.h
- The AUX_DATA structure declared in afximpl.h no longer defines BOOL bWin95 . This affects some code that was relying on this to switch APIs for mousewheel info (OXScrollWnd.cpp, OXZoomVw.cpp) and border style (OX3dTabView.cpp). This may break win95 deployments. Files affected:
  OXScrollWnd.cpp
  OXZoomVw.cpp
  OX3dTabView.cpp
- COXMenuBar was overriding CWnd GetMenu returning an HMENU handle, which breaks now that the base returns CMenu*. Code in oxmenubar.h now omits the override for _MFC_VER >= 0x0800, adding a GetHMenu call. Code in OXMenubar.cpp and OXCustomizeCommandsPage.cpp now switches between these calls based on _MFC_VER. Files affected:

> oxmenubar.cpp
> oxmenubar.h
> oxcustomizecommandspage.cpp

- In VS2008, the NONCLIENTMETRICS structure defined in WinUser.h carries with it an extra int iPaddedBorderWidth when WINVER is defined as 0x0600 (default - Vista) at compile time. Calls to SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ... ) compiled for Vista will fail on XP when the NONCLIENTMETRICS::cbSize is set to the 0x0600 value. Some of these calls are not wrapped in ASSERTs and will fail silently resulting in missing or wrongly sized fonts, or aborting some window creation routines.

> As an interim fix, code is added to double check the OS version when these calls are made and adjust the specified size accordingly - this may not be the only issue in deploying WINVER 0x0600 compiled apps on XP, but should help. Files affected:

> OXBitmapMenu.cpp
> OXMenuBar.cpp
> OXPopupBarCtrl.cpp
> OXSkins.cpp
> OXToolTipCtrl.cpp

Notes:

1. There seems to be a subtle change affecting the UT code for the handling of docking windows in MFC 8 - this issue remains unresolved with this update.
2. This update assumes Update 01 has been applied - Update 02 does not incorporate files changed in Update 01.

Thanks to Ian Brockbank, szombatha, HRS23, mhorowit, et al for suggestions and submissions.

## Version 9.3 (Update 01)

### Changes and fixes submitted by The Code Project community

The source file changes referenced in this update should all be annotated with 'v9.3 update 01' in comments. Briefly, the changes include:

- extensive modifications related to corrections in menu item handling submitted by Manfred Drasch - files affected:

> oxmenubar.h
> OxMainRes.h
> OXSkins.h
> OXBitmapMenu.cpp
> OXBitmapMenuOrganizer.cpp
> OXMenuBar.cpp
> OXSkins.cpp

- fix for initial sizing of properties window - Manfred Drasch

> OXSizeDockBar.cpp

- fix to ensure removal of tray icon in destructor of COXCustomizeTrayIconPage - Manfred Drasch

> OXCustomizeTrayIconPage.cpp

- fix for resource leak in COXGraphics::DrawRoundedButton submitted by r.guerzoni

> OXGraphics.cpp

- change to string deletion in COXTrace::WriteMsg - r.guerzoni

> OXTrace.cpp

- removed OX_CLASS_DECL from COXFullSceenFrame template - incompatible with DLL builds - ref mschuckmann

> OXFullScreenFrame.h

- correction to COXQuickString::AddString length calculation - Fix by Maurizio Giunti

> OXQuickString.cpp

- Fixes for incorrect length calculation for unicode conversion re registry writes - submitted by Karl Edwall

> OXMenuBar.cpp (lines 1384, 2443, 2759)

- removed garbage from registry strings in COXMenuBar::SaveMenuState and LoadMenuState - Tim Deveaux

> OxMenuBar.cpp

- small fixes to COXNumericEdit to suppress assertions, and fixes submitted by mina

> OXEdit.cpp

## Version 9.3

### Major release feature:

- The Hyperbar classes provide an easy way to add some cool UI functionality to any existing or new project that uses a toolbar.

### Bug Fixes:

- `OXSkins` - it's now possible ( and preferred ) to specify the desired skin using an enum
- The CustomiseManager sample has a minor bug fix, which caused a very rare crash
- `OutlookStyleDemo` : Added ability to change skin type at run time, and improved overall skin support.
- `COXBItmapMenu` : Fixed bug which caused documents to close when dirty without prompting
- COXFrameWndDock::MakeItDockable : Can now specify which sides to support and if we should dock immediately
- `COXFrameWndDock::AttachMDIChild` : Allows users to specify the side to dock to, before it would dock to the first one that was available. Also fixed some docking bugs in this class.
- `COXListEdit` : Added code to send a message to indicate editing has ended when the drop button is pressed.
- `COXPropertyTree` : Added code to send a message to indicate editing has ended when focus is lost.
- Moved all the skinning drawing into seperate classes, so they are all handled polymorphically by the toolbox controls.
- `COXSizeDockBar::TabAllDockedControlBars` : Added code so that the visible bar can be selected, via a pointer or by index.

## Version 9.2

### Major release feature:

- The entire code base is now compatible with VC++ 2005, VC++ 2003, and VC++ 6. You get zero-warning compilation on VC++ 2005.

### Bug Fixes:

- `COXComboPickerCtrl::OnPaint` now checks if the OS version is XP or higher, and if so it uses the default OS painting, else it does custom painting for the combo box arrow
- `COXCalendarPopup::OnPaint` : A bug (missing cast) has been fixed which caused an error in VC++ 7.1 or higher
- `COXDateTimeCtrl::OnDropDown` : The return value has been changed from TRUE to FALSE, thus fixing a bad bug where the parent window never gets to handle the notification.
- The bug in MDI child menus (in skinned mode) where the restore, minimize, and close items were shown in an un-skinned condition has been fixed.
- `COXSysInfo` has been updated to correctly identify all OSes up to Windows Vista.
- The Cool Controls demo had a bug where the Listbox tooltips came up as garbage - this has been fixed.
- Minor bugs have been fixed in the Status Bar demo (which caused garbage to show up in it)
- The Screen Grabber demo has been fixed to not crash on a multiple monitor setup.
- A trivial bug in `COXMDIFrameWndSizeDock::OnActivate` has been fixed.
- A bug in `COXTreeCtrl` that caused random crashes during drag/drop scenarios has been fixed.

## Version 9.0

### Major Upgrades:

1. The Office 2003 Look and Feel was added. The following Ultimate ToolBox UI elements support this new skin:
   1. Menus
   2. Toolbars and menubars
   3. Docking windows
   4. MDI tabs and Tear-off tabs
   5. Shortcut bar
   6. Properties window
   7. Status bar

2. The Properties window was enhanced to look more like the VS.NET properties window.

### Minor Changes and Fixes:

1. A bug causing the Caption Painter not to work in Windows XP was fixed.
2. A problem casing excessive flashing of the toolbar, menu bar and docking windows under the Office XP skin was fixed.
3. A problem causing the close, minimize and maximize buttons of the menu bar to appear too large in skinned Windows XP was fixed.
4. A bug causing a floating toolbar to stick to the mouse cursor even after the user has released the button was fixed.
5. A GDI leak found in the Office XP skin causing problems in Windows ME was removed.
6. Several upgrades to the `COXTreeCtrl` were implemented:
   1. Arrow key navigation was added.
   2. Various drawing problems involving different back colors were fixed.
   3. An item indentation problem involving adding a child item to a collapsed parent was fixed.
7. A problem in `COXPreviewDialog` caused by a font that does not exist in all operating systems was fixed.
8. The classes `COXTreeCtrl` and `COXGridCtrl` will draw their sort headers correctly now in Windows XP skinned mode.
9. Several upgrades to the `COXPropertiesWnd` class were implemented:
   1. `OnDeleteProperty()` notification was added.
   2. A method for deleting all properties called `DeleteAll()` was added.
   3. A problem causing a crash if a property is deleted while being edited was fixed.
   4. A problem causing the combo box drop list not to show in its entirety was fixed.
   5. Added the following functionality: when editing a property the changes will be accepted if Enter is pressed and discarded when Escape is pressed.
10. Fixed a problem in `COXMultiComboBox` causing uncontrolled scrolling to the bottom of the drop list in Windows XP skinned mode.

### Sample Changes:

1. The SkinsDemo sample was enhanced to show the new Office 2003 look and feel.
2. The SkinsDemo sample was upgraded to demonstrate how to show and hide the different docking windows from the View menu.

### New Classes:

1. `COXUxTheme` – internal class used by various Ultimate Toolbox classes designed to detect the presence of Windows XP skins and retrieve their color schemas.

## Version 8.1

### Major Upgrades:

1. Visual Studio.NET 2003 full compatibility.
2. Enhancements to the VS.NET like properties window: the following property types with their appropriate editors are now supported:
   1. Text
   2. Numeric (with the ability to specify the number of decimal places)
   3. List of items (enumeration)
   4. Date
   5. IP address
   6. Currency
   7. Color
   8. Filename
   9. Directory
   10. Time (from nanoseconds to days)
   11. Angle (degrees, radians or grades)
   12. Length (metric or imperial)
   13. Temperature (Celsius, Fahrenheit, Kelvin)
   14. Custom field with a custom editor.

### Minor Changes and Fixes:

1. The `TVOXS_NOFOCUSRECT` style was introduced in `COXTreeView` to provide the ability to turn off the item focus rectangle for selected items.
2. A buggy assertion statement was removed from `COXMDIChildWndSizeDock::Create(…)`
3. An auto-scrolling problem in `COXMultiComboBox` was fixed.
4. A bug in `COXPhysicalEdit` causing a crash was fixed.
5. A bug causing all drop edit controls to show garbage characters in the tooltips was fixed.
6. A bug preventing `COXTreeCtrl::SelectItem(…)` from having any effect in single selection mode was fixed.
7. A bug causing a floating menu to jump away from the mouse cursor was fixed.

### Sample Changes:

1. The SkinsDemo sample was enhanced to demonstrate the use of `COXPropertiesWnd` and all the different type of properties that are supported.
2. The CustomizeManager sample was modified to reflect that in `CMainFrame::OnCreate()` `InitializeToolbars()` must be called prior to calling `InitializeCommands()`.

### New Classes:

1. `COXPropertyTree` – internal class used by `COXPropertiesWnd`.
2. `COXListEdit` – A drop edit control with the ability to display a list of items.
3. `COXListPopup` – internal class used by `COXListEdit`.
4. `COXIPEdit` – A an IP address edit control.
5. `COXCalendarEdit` – A drop edit control for dates.
6. `COXMonthCalPopup` – internal class used by `COXCalendarEdit`.

## Version 8.02

### Changes and Fixes:

1. When the snapping and tear-off behavior is enabled a floating window could not be resized. This was fixed.
2. OXShdWnd.cpp was not added to the build library project causing link errors. This was fixed.
3. In `COXPropertiesWnd` it was possible to edit a category name, which caused a crash. This was fixed.
4. When the extended tree control (`COXTreeCtrl`) is automatically populated the user could not expand the tree by single clicking on the plus. This was fixed.
5. Some painting problems of the edit control of the extended tree were fixed.
6. A problem preventing a date item from being edited in the extended tree was fixed.
7. The `COXShdWnd` class was not declared as exportable, which caused some link errors. This problem was fixed.
8. In the Customize Manager it was possible to turn off the “cool look” of the toolbars while in OfficeXP skin mode, which caused a crash. This problem was fixed.
9. A paining problem of `COXCustomTBComboBox` with the `CBS_DROPLIST` style under the Office XP skin was fixed.
10. A problem causing `COXSkinnedCombo` not to send `CBN_SELCHANGE` message was fixed.
11. A problem causing a floating window not to redraw the window behind it fast enough while moving was fixed.
12. In `COXDao` the `FindNext` method will work properly with searches on string values.

### Sample Changes:

1. A new sample called CustomizeManager was added to the samples/advanced/ directory. This sample demonstrates how to use COXCustomizeManager. The different steps required are written as comments in the source code. Just search for the string “STEP”.
2. A new sample called ExtendedTreeControl was added to the samples/gui/ directory. This sample shows how to achieve the functionality of COXTreeCtrl demonstrated in the downloadable Demo Browser.
3. The link errors in the TabViews sample were fixed.

## Version 8.01

### New Functionality:

1. Ability to programmatically tab all docked windows on a dock bar. Use `COXSizeDockBar:: TabAllDockedControlBars(…)` to accomplish this.

### Changes and Fixes:

1. `COXSkinnedComboBox` now sends proper notification messages.
2. A combo box custom toolbar button is now properly centered in the Windows XP skin.
3. A behavior problem was fixed when the user double-clicks the gripper of a tabbed docking window.
4. A behavior problem was fixed preventing the user from moving a docked toolbar to the left edge of the windows without the toolbar going into float mode.
5. A crash in `COXPreviewDialog` which only occurred in Windows 2000 when compiled with VC7 was fixed.
6. Missing files causing links errors were added to the SideBySideToolbars sample.

## Version 8.0

### Major Features:

Snapping Toolbars, Menubars and Docking Windows | When a toolbar, menubar or a docking windows is being dragged the entire content is shown instead of just the outline. When it is being docked it snaps to its appropriate position before the user releases the mouse button. This behaviour is the same as the snapping toolbars and docking windows of Visual Studio .NET.
Detachable tabs | Two or more docking windows can be docked to the same area of then screen. When they are only one of the is shown and the others can be activated by clicking on the appropriate tab on the bottom. The user can click on a tab an drag it away, therefore separating a docking window from the group, hence the name "detachable tabs". Behaviour is similar but not identical to the detachable tabs of Visual Studio .NET
Properties Window | A new window designed to provide UI for properties and property categories.
Window Shadows | A new template class called `COXShadowedWnd<...>` providing the ability to display a shadow behind any window. The implementation does not require Win 2000 or higher and allows the shadowed window to be moveable and sizeable.

There are also numerous minor features, updates and bug fixes.

## Version 7.52

### Changes and Fixes:

1. The “octodll” project was renamed to “UT”.
2. The “octolib” project was renamed to “UTStaticLib”
3. The files “UTDLL.h” and “UTStaticLib.h” were added to the /include folder to automatically link to the appropriate .LIB file.
4. A `CFormView` constructor was added to COXSkinnedView.h
5. Various bug fixes.

### Sample Changes:

1. Two new samples were added to /samples/GettingStarted
   1. UsingDLL – explains how to use the Ultimate ToolBox in a DLL.
   2. UsingStaticLib – explains how to use the UltimateToolBox in a static library.

## Version 7.51

### Office XP Skin Fixes:

1. The colors of a skinned application are now determined exactly the same way as Office XP, so a skinned application will look the same as Office XP under any color scheme.
2. A drawing problem of `COXSkinnedCombo` in Win XP with Common Controls 6.0 was fixed.
3. A skinned mini frame window will no longer show a non skinned close button when sized.
4. A GDI leak was removed that could lead to a crash on some systems.
5. A menu positioning problem causing the menu to pop on top of the menu bar item when the menu bar is docked at the bottom of the application was fixed.
6. A problem causing the `COXCoolToolBar` to draw incorrectly when the item images are very large was fixed.
7. The main frame will now properly recalculate it layout when the skins are changed dynamically.
8. `COXStatusBar` will now properly draw a bitmap under the Office XP skin.
9. Win 9x: The slit window separators will now be properly drawn.
10. The size of the menu check boxes was corrected.
11. The skin classes will no longer report Level 4 warnings.
12. Win 9x: A drawing problem with the menu shadow when the menu bar is docked to the bottom was fixed.
13. Win 9X: A popup window will no longer interfere with the shadow if its parent window.
14. Win 9x: A problem causing the menu bar not to draw while moving was fixed.
15. Win 9x: The hot icons of a toolbar or a menu will now be raised and will drop a shadow.
16. Win 9x: A problem causing the toolbar and shortcut bar images not to draw transparently in 32-bit color was fixed.

### Other Changes:

1. Multi-monitor support was added.
2. OXToolTipCtrl.cpp was added as a dependency to OXBitmapMenu.cpp, so you might have to add OXToolTipCtrl.cpp to your project to avoid linker error LNK2001.

### Sample Changes:

1. The OulookLikeDemo sample was modified to demonstrate skinned drop down buttons properly.
2. More comments were added to the SkinsDemo to show the steps involved in adding skins to an application. Just search for "STEP".