Now you can use Davide Calabro's excellent
CButtonSt class in your ATL/WTL projects. The Class is still called
CButtonSt and it retains a majority of the original code. Just follow these simple instructions:
- Create a WTL Project
- Design the dialog and add the button controls
- Add the ButtonST.h header file to your project
- Assign a
CButtonSt to each button.
- Subclass each member controls (
CButtonST) to each ID using the
- uses the
CButtonSt methods to change the appearance of the control.
- In your dialog, don't forget to add the macro
REFLECT_NOTIFICATIONS which allows the buttons to get messages like
class MyDialog : public CDialogImpl<MyDialog>
LRESULT OnInitDialog(UINT , WPARAM ,
LPARAM , BOOL& );
LRESULT MyDialog::OnInitDialog(UINT , WPARAM ,
LPARAM , BOOL& )
See Davide Calabro's original
CButtonSt article for more details.
- 26 June 2001
- Updated to Davide Calabro's version 3.2
- Added support for defining the icons from an image list
- Added support for creating dynamically the buttons
- 14 June 2001 - Fixed a bug in the autorepeat feature
Serge https://www.codeproject.com/script/images/smiley_wink.gif Thank you.