WinButtonEdit 1.1.0.3  2012-10-23 by Ath
----------------------------------------
What's new:
2012-10-23, v1.1.0.3
* Updated to match with WinButtons 3.6.1 for dropped files support
! Fixed issue that the previous Variables list was not cleared on opening another configuration file
! Changed to not compile in x64 mode
2012-10-20, v1.1.0.2
- * Updated Copyright message
- ! Fixed some variable-entry related bugs
- ! Fixed saving of AskConfirm option per button
- * Refactoring: Replaced several occurrances with ReDim statements by a function, ReDimming all related arrays (Buttons and Groups)
2012-10-09, v1.1.0.0
- + Added support for [VarParams] editing on Variables tab, and enabling the entry of parameters on the Global settings tab
	If this option is enabled, the tooltip shows the command to be executed, instead of any tooltip set.
- + Added an option per button to ask a confirmation before executing the command, with configurable prompt-message on the Global settings tab
2011-10-11, v1.0.5.2
- * Fixed running DCUHelper only after asking, and asking to save the current file if modified. Also now quits after starting DCUhelper, to properly allow updating WinButtonEdit.exe
2011-10-08, v1.0.5.1
- + Added Apply button to Image parameters window, return to last control on Apply clicked
- * Improved interaction between Preview and Image parameters, so selecting a preview button saves any changes made if 'Update preview on changes in Image parameters' isn't enabled
- + Added Image parameters sliders-range configurable via Options submenu (predefined at 64, 128, 256, 512 or 1024, default = 128)
2011-10-07, v1.0.5.0
- * Improved sub-dialog for setting the Image properties
- + Added option 'Update preview on changes in Image parameters'
- * Changed clicking on a preview button to update the Image parameters if that's open.
2011-10-06, v1.0.4.9
- + Added sub-dialog for setting the Image properties
2011-09-26, v1.0.4.4
- * Improved support for captions on borderless buttons with enforced linefeeds, use @lf@ to create a line break (AutoIt3 macro for Line-feed)
2011-09-25, v1.0.4.3
- * Improvements in caption display routines
2011-09-24, v1.0.4.2
- + Added scaling for borderless buttons with images, by specifying the size with the imagename like [-]layout[,width[,height[,borderwitdh[,leftoffset[,topoffset]]]]]) in front of the filename, the optional - at the start specifes scaling enabled, terminated with a ), all to be prefixed to the image filename
- * Improved layout for borderless buttons, 0..3 like below (2011-09-23), 4..7 like 0..3 but with left-aligned caption-label text, 8..11 like 0..3 but with right-aligned caption-label text
- * Graphics supported by GDIPlus should be: BMP, ICON, GIF, JPEG, Exif, PNG, TIFF, WMF, and EMF, but only on borderless buttons!
- * Improved image selection to preserve any (prefixed) parameters already present, and include .png files in the filebrowser
2011-09-23, v1.0.4.1
- * Improved support for graphic files, including scaling, for borderless buttons only!
- + Added (display) support for borderless buttons with buttonlayout 0) = image top - label bottom, 1) label top - image bottom, 2) image left - label right - half width, 3) label left - image right - half size
- * Improved handling of borderless buttons
2011-09-22, v1.0.4.0
- + Added support for borderless buttons at global, group and button level
- + Added support for .png files
2011-09-21, v1.0.3.9
- + More implementation of border-less buttons, now displays images and label in 1 spot by drawing a Picture and a label in the requested space
2011-09-20, v1.0.3.8
- + Started implementing border-less buttons
2011-09-13, v1.0.3.3
- * Moar testing
- * Fixed Variables tab not being re-enabled after running current file with WinButtons
- * Fixed redrawing the preview if relevant (group/button) input fields change
- * Fixed issue of not saving Group or Button width/height of 128 (default size)
2011-09-12, v1.0.3.2
- * Fixed enable/disable issues with some Global parameters controls
- * Fixed Button parameters Arrangement combobox state/synchronicity
- * Fixed 'hang' and background color issues when adding a new Group
2011-09-11, v1.0.3.1
- * Testing more and some minor improvements
- + Added DCUpdater support, and 'Check for updates...' menu-entry if dcuhelper.exe is found in the current directory. Checks for WinButtonEdit and WinButtons updates if either or both .dcupdate files are present. Automatic update checking is not provided!
2011-09-10, v1.0.3.0
- ! Fixed losing Captions of buttons in groups (as reported by nudone)
- ! Fixed losing changes made for a button and then switching button-context by selecting a button on the preview
- + Added setting for FlipKeyColor in Global parameters
- + Added support for FlipKeyColor to DemoDisplay to work like in WinButtons, but only for local setting, not enabled/inherited from WinButtons.wbuc/ini!
2011-09-06, v1.0.2.0
- * Improved configurability of CursorRestore option, by providing a couple of buffersizes, selected using a combobox.
- * Changed cursorrestore setting to accept values from 0 to 4, (1 small=3, 2 standard=6, 3 medium=9, 4 large=15) with corresponding mouse-position buffersizes
2011-09-02, v1.0.1.1
- * Testing CursorRestore feature and some minor improvements
2011-09-01, v1.0.1.0
- + Added CursorRestore option and support during testing
- + Added display of the Demo position Top and Left coordinates, so they can be more easily configured by dragging the window at the desired location. Updated after moving the demo window
- + Added menuitem to the Demo position display to copy coordinates to Top and Left global fields (confirmation asked)
2011-07-27, v1.0.0.0 (Release)
- * Bumped to have an official release version 1.0
2011-07-04, v0.9.3.0 (RC10)
- + Added scaling for .bmp files, by prefixing the image filename with a dash like -flower.bmp. The image is scaled to fit the button size
- * Retried to extract an icon from .exe/.dll files to display the non-default icon size, but didn't succeed. Added instructions to use NirSoft's IconsExtract utility to find the index and extract the icon
2011-07-02, v0.9.2.3 (RC9)
- + Added support for Environment and macro expansion when using images, so @SystemDir@\shell32.dll,-121
- + Added automatic translation between directories available through @ macros when selecting an image file, examples: @WindowsDir@, @SystemDir@, etc.
2011-07-01, v0.9.2.2 (RC9) (not released)
- * Improved Image selection dialog for .exe/.dll/.ocx/.icl support and updated relevant routines
- + Added Icon selection dialog during Image selection, if .exe/.dll/.ocx/.icl file is opened
- ! Changed all File selection dialogs to return to the original directory after use
- ! Changed when selecting a button in the sample display, return focus to WBE
2011-06-30, v0.9.2.1 (RC9) (not released)
- * Improved adding icons from exe and dll support, searching for larger display of icons
2011-06-27, v0.9.2.0 (RC9) (not released)
- + Added support for icons from exe and dll files, and also support for an icon index into the file (requested by ewemoa)
- * Changed Added *.exe and *.dll to image selection dialog
2011-06-20, v0.9.1.1 (RC8)
- + Added 'Edit with WinButtonEdit' to 'Set file association for .wbuc' menu
- * Changed Associate with WinBut... to Open with Winbut... in 'Set file association for .wbuc' menu
- * Changed to set 'Open with WinButtonEdit'/'Edit with WinButtonEdit'/'Open with WinButtons' for Explorer context menu instead of the default 'Open' or 'Edit'
- * Improved some minor stuff in code, added some more #regions
2011-06-19, v0.9.1.0 (RC7)
- * Changed File/New to do nothing is Cancel was clicked on the Save File dialog
- * Improved File Selection (Open/Save) dialogs to include *.wbuc + *.ini and *.* selections and each choice separate
- * Improved File/New and File/Save as to add the filename to the MRU list
- ! Fixed Drag&Drop ignored .ini files because of a wrongly placed round brace :(
- ! Fixed Save routine for a typo (confitionmode/conditionmode), and it now deletes any removed/obsolete buttons and groupnames during save
2011-06-18, v0.9.0.0 (RC6)
- + Added 'Multiple files dropped...' Option and made single file dropped the default behavior
- * Fixed handling of default extension for save and load
- * Fixed 'Move button to Group' when moving to empty (no button) group
2011-06-17, v0.8.6.0 (RC6) (not released)
- + Added Drop-files support requested by ewemoa and some expectations by cranioscopical ;)
- + Added Associate .wbuc with WinButtonEdit (or WinButtons) feature, as requested by cranioscopical
2011-06-16, v0.8.5.1 (RC6) (not released)
- * Minor issues related to WinButtons update
- * Fixed flashing effect when 'Move button to Group' was done
2011-06-14, v0.8.5.0 (RC6) (not released)
- * Fixed 'Move button to Group' feature, got to do something about the flashing though
2011-06-14, v0.8.4.1 (RC5)
- ! Fixed issues with saving an empty file /variables (cranioscopical)
- ! Disabled 'Move button to Group', not working yet
2011-06-13, v0.8.4.0 (RC5) (not released)
- + Added Move button to Group context menu and initial functions (ewemoa), not OK yet
- ! Fixed issues with 'Insert Button'
2011-06-13, v0.8.3.1 (RC4)
- + Added Fields and updated layout to add On Drop command to button parameters
- - Removed a left-over Debug messagebox in the File/Save routine...
2011-06-12, v0.8.3.0 (RC4) (not released)
- + Added Drop Files support to WinButtons and Preview
2011-06-11, v0.8.2.0 (RC3)
- ! Fixed Tree selection issues when clicking a button in the preview (ewemoa)
- ! Fixed File/Open, File/Save or File/Save as... then selecting WinButtonEdit.ini gives a warning and doesn't open/save that file (ewemoa)
- ! Fixed Initial treeview didn't display the expander image on the last Group tree-item when not expanded initially (ewemoa)
- ! Fixed File/New to create the Empty group in the tree (cranioscopical)
- ! Fixed Deleting all buttons crashed with array-index errors (cranioscopical)
- ! Fixed File/Save didn't write a new file because all parameters saved where default and so not saved. Now always stores Top and Left settings so the file is actually saved (cranioscopical)
2011-06-09, v. 0.8.1.0 RC2
- + Auto-resize for non-96 DPI displays
- + Disable Systemtray icon
- ! Fixed issue with Reload last used WinButtons file

2011-06-05, v. 0.8.0.0 RC1
- Initial release
--------------------------------------
WinButtonEdit (WBE) is a configuration editor for WinButtons, as published here: http://ath.dcmembers.com/wb/pages/software/winbuttons.php
WBE is included with WinButtons in the downloadable zipfile.
Default extension for configuration files is .wbuc, with a fallback to .ini

It shows all buttons from a configuration file in a treeview, grouped by the groups (if any) configured in the same file.
On selection of a button it's settings are displayed, and can be edited. After leaving that field the preview is updated with the new value (when relevant).
If the button isn't in the default (empty) group, the group settings can also be configured after selecting the 'Group parameters' tab. Changes are again reflected in the preview when relevant.
Any 'Global parameters' (the [Settings] section in the configuration file) can be changed on the tab with that name.
And finally the Variables tab allows to create, edit, delete and reorder, any variables to be used in other settings throughout WBE. As documented in the WinButtons.readme.txt file, these variables should be prefixed with :var and postfixed with a colon.

Drag&Drop Files support: 
When a .ini or .wbuc file is dropped on an instance of WBE, the file is loaded into WBE after asking for a save of the current file if that was changed. If the save is cancelled, the file is opened in a new instance of WBE.
If the option 'Multiple files dropped open new WBE instance' is enabled, then multiple files can be dropped on a WBE instance. The first will be opened by the current WBE session, all next files are opened each by a new instance of WBE.
If the currently open file is (a member of the set of files) dropped on WBE, it's ignored, but kept in the current WBE session.

Several options to change the behavior of WBE are available in the Options menu:
Set file association for .wbuc files	: Submenu for setting the file-association for the .wbuc extension
	Open with WinButtonEdit				: Set the .wbuc filetype to open with WinButtonEdit on double-click (toggle)
	Edit with WinButtonEdit				: Set the 'Edit' action for .wbuc filetype to WinButtonEdit (toggle)
	Open with WinButtons				: Set the .wbuc filetype to open with WinButtons on double-click (toggle) (Only available if WinButtons.exe is found in the same directory)
Image parameters Sliders range			: Submenu for selecting the rabge of the sliders in the Image prameters window
	64, 128, 256, 512, 1024				: Pre-defined ranges for the sliders, their tooltip shows the available min/max values, the offset sliders allow for -x <-> x range, and the others 0 <-> x range. Default = 128.
Move Arrangement with button			: (Checked by default) When moving buttons up or down, the Buttonarrangement can be moved with the button, or stay at it's original place.
Expand first buttongroup after load		: (Checked by default) Speaks for itself.
Expand all button groups after load		: Can be useful when editing groups a lot.
Confirm Delete							: (Checked by default) A security measure. Deleting a group always asks for confirmation.
Update preview on changes in Variables	: When using variables in button captions or sizes, updating the preview on change of a variable can be a convenience.
Update preview on changes in Image parameters	: While in Image parameters window, changing values immediately updates the preview window
Update input tooltip w. Variables replaced	: When working with variables alot, having the calculated result available in the tooltip for each field allows for a quick check of the result.
Reload last used WinButtons file		: A convenience feature
Display WinButtons view-only preview	: (Checked by default) After closing the preview (select the preview window and press <Esc>) this option allows to re-open the preview.
'Run WinButtons...' (Ctrl-R) blocks input	: (Checked by default) To discourage changing settings in WBE while the test-run is active, as this isn't actively updated. 
											  If Enabled the preview is closed, and all input fields are disabled, when WinButtons is run from WBE.
Multiple files dropped open new WBE instance	: If this option is checked, then when multiple supported files (.ini or .wbuc) are dropped on WBE, all files are opened in a new instance of WBE.
Assume all Conditions True (not saved)	: Allow to display/preview buttons that would normally only show when specific conditions are met. 
										  This setting isn't saved, on purpose, and reset when loading another configuration, or starting a new configuration.

The last 10 files opened are saved in the WBE ini file, and displayed in the 'Files/Open recent...' menu. The order is determined by the most recently used (MRU) item.
Files opened from the commandline (-f parameter) are also added to this MRU list.
Any file that no longer exists is removed from the MRU list.

The Preview window can be dragged around the screen, and inherits most of the configured parameters, except for Top and Left. It is initially displayed along the right/top side of the WBE window, except when it's been moved around, then it is shown in it's last position.
To reset the position of the preview, close the preview (select the window and press <Esc>), then close WBE, so the coordinates are reset. When re-opening the preview on next launch of WBE, it's position is restored beside the WBE window.
The last position that the preview windows is dragged to is displayed on the menu of WBE, and it offers an option to copy the coordinates to the Global Top and Left fields, if the preview is dragged to the desired (external touchscreen?) location.
While displaying the Preview window, there is not the usual processing of active appplications, as used for Group switching, or conditions set on any button. This exercise is left for actual testing using WinButtons.
Testing the real behavior of WinButtons is best done using WinButtons, so there's the 'File/Run WinButtons with current file' menu item available, shortcut key is Ctrl-R. 
This menuitem is only available when WinButtons.exe is found in the current directory.

The WBE options, last opened file, and MRU list are automatically saved when WBE is closed.

If any change to a configuration item is detected, and the file isn't saved yet, a question pops up to either save or not save the file, or cancel the new action, like Close or Run WinButtons.

Images:
An optional icon (.ico, .exe, .dll, .ocx and .icl file) or bitmap (bmp) file to display on the button. Doesn't allow for combination of icon/bitmap and text! If a hotkey is set using an & in the button or caption setting, then that hotkey is still enabled!
When using an icon, then the icon-index can be specified by adding ,<index>. The best choise usually is the numeric (negative) index. For .exe, .dll, .ocx and .icl files, the default index (when ommitted) is set to 0.
When using an actual .ico file that contains multiple size icons, the best icon should be emperically determined, by trying several (negative) indexes.
Using the Image browse button next to the input field, and selecting a .exe, .dll. .ocx or .icl file, opens an Icon selector displaying the icons in the file. After selecting an icon, it's index is added to the filename. Some trial and error to select the desired icon could be needed, as not all icons can be displayed using the default negative index. Then a non-negative value (switched using the "by Name"/"by Ordinal" button) usually gives the expected display.
Any path used for an image/icon file is replaced with the best fitting @ macro where appropriate

If a larger iconsize then 32x32 pixels is needed to display on a button, NirSoft's IconsExtract utility could be used extract the desired icon to a .ico file, find the iconindex in the icon by double-clicking it in InconsExtract and selecting the indexnumber with the desired size. Then use the saved .ico file in WBE as Image, using the index shown in IconsExtract.
IconsExtract can be found at: http://www.nirsoft.net/utils/iconsext.html 