// TODO: Add extra initialization here
// { VERIFY(m_editCopy.AutoLoad(IDC_BUTTON1,
this));
...
// } return TRUE; // return TRUE unless
you set the focus to a control // EXCEPTION: OCX Property
Pages should return FALSE }
BEGIN_MESSAGE_MAP(CTry03Dlg, CDialog)
//{{AFX_MSG_MAP(CTry03Dlg)
...
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
...
BOOL CTry03Dlg::OnInitDialog()
{
...
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
// {
m_btn1.SetTextColor(RGB(255,0,0));
m_btn1.SetSkin(IDB_B1NORM,IDB_B1DOWN,IDB_B1OVER,IDB_B1GRAY,
0,IDB_B1MASK,0,0,0);
// }
return TRUE; // return TRUE unless you set the focus to a control
}
...
void CTry03Dlg::OnButton1()
{
// TODO: Add your control notification handler code here
...
}
CButtonST -> CButton
.SubclassDlgItem() // DDX_Control()
.SetIcon()
BTNST_AUTO_GRAY
.DrawBorder()
.SetColor()
.SetTooltipText()
class CTry01Dlg : public CDialog
{
// Construction
public:
CTry01Dlg(CWnd* pParent = NULL); // standard constructor
// TODO: Add extra initialization here
// {
m_btn.SetIcon(IDI_ICON1,
(int)BTNST_AUTO_GRAY);
m_btn.DrawBorder(FALSE);
// }
return TRUE; // return TRUE unless you set the focus to a control
}
CGdipButton -> CButton
.LoadStdImage()
#include "GdipButton.h"
class CTry01Dlg : public CDialog
{
...
CTry01Dlg(CWnd* pParent = NULL); // standard constructor
BEGIN_MESSAGE_MAP(CTry01Dlg, CDialog)
//{{AFX_MSG_MAP(CTry01Dlg)
...
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
...
BOOL CTry01Dlg::OnInitDialog()
{
...
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
// {
m_button.LoadStdImage(IDR_MYPNG1, _T("MYPNG"));
// }
return TRUE; // return TRUE unless you set the focus to a control
}
...
void CTry01Dlg::OnButton1()
{
// TODO: Add your control notification handler code here
...
}