With this class you can easily give a skin to your buttons in few steps:
CxSkinButton
. If the Class Wizard doesn't show the CxSkinButton
type, select CButton
and then edit the code manually.CxSkinButton
methods:
BOOL CxSkinButtonDemoDlg::OnInitDialog() { // ... m_btn1.SetTextColor(RGB(255,0,0)); m_btn1.SetToolTipText("Button1"); m_btn1.SetSkin(IDB_B1NORM,IDB_B1DOWN,IDB_B1OVER,IDB_B1GRAY,IDB_B1MASK,0,0,0); // ...
The SetTextColor
and SetToolTipText
are self explaining;
SetSkin
is:
void CxSkinButton::SetSkin(UINT normal,UINT down,UINT
over,UINT disabled,UINT mask, short drawmode, short
border, short margin)
basic implementation and interface.
enhanced mouse tracking implementation (by Milan Gardian).
For any questions, e-mail to: ing.davide.pizzolato@libero.it
Thanks to all the Code Project developers!
Special thanks to:
Milan Gardian for mouse and keyboard tracking code.
Andy Green and Cameron Epp for suggestions & debugging.