Changelog
1.43 version (30/04/2007)
- fix: the handle to the theme was not set to NULL after release, so even if the theme handle pointed to nothing it wasn't recreated on subsequent calls to ImageButton_Create
1.42 version (16/01/2007)
- add: function to add more than one button at a time
- fix: wrong button appearance when the button was pressed and disabled before the button was depressed (eg if you disable it while you're handling its notification message)
- fix: non-client area not being redrawn when the button was disabled after being hovered
- fix: button state not being changed when the parent window is disabled.
1.41 version (10/11/2006)
- fix: ImageButton was releasing the uxtheme dll handle for an erroneous check and after it was no longer able to reload it. This was causing the button XP visual style to not be drawn at all, and (most of the time) a crash
1.4 version (09/11/2006)
- add: you can now set a disabled image
- add: slightly changed the way bitmaps are set and handled
- add: changed the way images are drawn. If, on the button's current state, there's no appropriate image to be drawn, the text is centered (like there is no image)
- add: you can now set a grayed image as disabled image and a lighter image as hover, starting from the normal image
- fix: in the WM_DRAWITEM handler, before searching the imagebuttons vector for the window handle, i now check if the window to be ownerdrawn is a button
- fix: changed the way the buttons are displayed under windows < XP. Now they look the same as the other buttons
- fix: changed the way bitmaps are drawn. DrawState is used instead of a memoryDC + Stretch Blt
- fix: restored the ability to set a button without images
- fix: the UNICODE version now works fine
- fix: moved the WM_THEMECHANGED notification handler from the button proc to the parent button proc
- fix: moved the code where i check whether or not to free the uxtheme instance from the parent button proc to the button proc (since the imagebutton vector can't be empty before destroying the buttons)
- fix: the demo executable was calling DestroyWindow && PostQuitMessage but the dialog was modal
1.31 version (06/11/2006)
- fix: the create functions no longer require the button text. The button text is obtained with GetWindowText when drawing.
- fix: avoid setting the default cursor if the cursor handle is NULL
- fix: when setting an image from IDs, if an error occur the image are now freed before the function returns
- fix: removed the unneeded function comments in the source file
- fix: namespace to avoid name collision
- fix: removed the hard-coded path for the output in the demo's Codeblock project
1.3 version (17/01/2006)
- fix: the ImageButton source file was erroneously saved as a C file (but i was already using new/delete, overloading, etc.) and if you tried to compile it on the Microsoft compiler, you'd get a bunch of errors. Now it's a .cpp file.
- fix: the number of buttons is no longer fixed but dynamic, thanks to the use of the std::vector.
- fix: the button's caption is now stored in a std::string. Just easier to handle.
- add: the extension now supports Unicode.
- fix: the handles to the images were not destroyed before being substituted.
- fix: thanks to the use of vector, and the removal of useless repetitive code, the ImageButton source file has been reduced by 200 lines!
1.2 version (14/11/2005)
- add: the image now stick to text, whatever is the lenght of the text. No longer fixed position: if there's no text, the image will be centered. The longer the text, the more the image will move to the left until it reaches the border.
- add: The default behavior of the button is now complete: when you click on the button and, holding down the mouse button, you move the mouse outside the client area of the button and reenter it, the button will switch from pressed to normal state.
- fix: fixed the flickering of the button when the mouse is moved outside the client area
- fix: the text will now be allocated on the heap and not on the stack (dynamically and not statically) and it's no longer a copy of pointers. Infact, in the old version it was impossible to assign an array to the button.
- fix: fixed some GDI resource leak
1.1 version
- add: now you can load images from DLL/EXEs
- add: now you can load icons with any dimension you want
- fix: the code has been shorten and improved
- add: now you can create an owner draw button without specifying images
- fix: fixed bug where the prop of some buttons were not moved a structure down when a button was destroyed
- fix: fixed bug where the theme library would be released before all the buttons were destroyed
1.0 version
This page was last modified
39 months, 2 weeks, 4 days and 8 hours ago