ListDlg.cpp
资源名称:VC6.0.rar [点击查看]
上传用户:qdhmjx
上传日期:2022-07-11
资源大小:2226k
文件大小:1k
源码类别:
书籍源码
开发平台:
Visual C++
- // ListDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "ex81.h"
- #include "ListDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CListDlg dialog
- CListDlg::CListDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CListDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CListDlg)
- m_strColor = _T("");
- //}}AFX_DATA_INIT
- }
- void CListDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CListDlg)
- DDX_Control(pDX, IDC_COLOR, m_CtrlColor);
- DDX_LBString(pDX, IDC_COLOR, m_strColor);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CListDlg, CDialog)
- //{{AFX_MSG_MAP(CListDlg)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CListDlg message handlers
- BOOL CListDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
- //给列表框添加选择项
- m_CtrlColor.AddString("红色");
- m_CtrlColor.AddString("绿色");
- m_CtrlColor.AddString("蓝色");
- UpdateData(FALSE);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }