-
Notifications
You must be signed in to change notification settings - Fork 3
/
Mydiymove.cpp
72 lines (58 loc) · 1.59 KB
/
Mydiymove.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Mydiymove.cpp : implementation file
//
#include "stdafx.h"
#include "Group4.h"
#include "Mydiymove.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Mydiymove dialog
Mydiymove::Mydiymove(CWnd* pParent /*=NULL*/)
: CDialog(Mydiymove::IDD, pParent)
{
//{{AFX_DATA_INIT(Mydiymove)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void Mydiymove::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(Mydiymove, CDialog)
//{{AFX_MSG_MAP(Mydiymove)
ON_CBN_EDITCHANGE(IDC_COMBO1, OnEditchangeCombo1)
ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
ON_CBN_SETFOCUS(IDC_COMBO1, OnSetfocusCombo1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Mydiymove message handlers
void Mydiymove::OnEditchangeCombo1()
{
// TODO: Add your control notification handler code here
CComboBox m_combo;
m_combo.ResetContent();
m_combo.AddString("上移");
m_combo.AddString("下移");
m_combo.AddString("左移");
m_combo.AddString("右移");
m_combo.SetCurSel(-1);
}
void Mydiymove::OnSelchangeCombo1()
{
// TODO: Add your control notification handler code here
//获得当前选择的列表项索引
CComboBox m_combo;
int nIndex = m_combo.GetCurSel();
CString strCBText;
//根据指定的索引获得该项的数据
m_combo.GetLBText( nIndex, strCBText);
MessageBox(strCBText);
}
void Mydiymove::OnSetfocusCombo1()
{
// TODO: Add your control notification handler code here
}