Skip to content

Commit

Permalink
为取色按钮添加图标
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongyang219 committed Nov 28, 2018
1 parent 644d105 commit aba6334
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ColorPicker/ColorPickerDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ void CColorPickerDlg::DoDataExchange(CDataExchange* pDX)
DDX_Control(pDX, IDC_COLOR_LIST, m_color_list);
DDX_Control(pDX, IDC_COLOR_STATIC, m_color_static);
DDX_Control(pDX, IDC_COLOR_NEW_STATIC, m_new_color_static);
DDX_Control(pDX, IDC_PICK_COLOR_BUTTON, m_btnColorSelect);
}

BEGIN_MESSAGE_MAP(CColorPickerDlg, CDialog)
Expand Down Expand Up @@ -223,6 +224,9 @@ BOOL CColorPickerDlg::OnInitDialog()

m_new_color_static.SetHandCursor(false);

m_btnColorSelect.SetImage(IDB_AFXBARRES_COLOR_PICKER);
m_btnColorSelect.SetFont(GetFont());

//获取窗口初始大小
CRect rect;
GetWindowRect(rect);
Expand Down
1 change: 1 addition & 0 deletions ColorPicker/ColorPickerDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class CColorPickerDlg : public CDialog
CColorListCtrl m_color_list;
CColorStatic m_color_static;
CColorStatic m_new_color_static;
CMFCButton m_btnColorSelect;

CSize m_min_size;

Expand Down

0 comments on commit aba6334

Please sign in to comment.