DlgOptEmotion.cpp
资源名称:ROA3.40.rar [点击查看]
上传用户:tianheyiqi
上传日期:2010-04-16
资源大小:282k
文件大小:2k
源码类别:
外挂编程
开发平台:
Visual C++
- // DlgOptEmotion.cpp : implementation file
- //
- #include "stdafx.h"
- #include "roa.h"
- #include "DlgOptEmotion.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CDlgOptEmotion dialog
- CDlgOptEmotion::CDlgOptEmotion(CWnd* pParent /*=NULL*/)
- : CDialog(CDlgOptEmotion::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CDlgOptEmotion)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- void CDlgOptEmotion::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CDlgOptEmotion)
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CDlgOptEmotion, CDialog)
- //{{AFX_MSG_MAP(CDlgOptEmotion)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CDlgOptEmotion message handlers
- BOOL CDlgOptEmotion::OnInitDialog()
- {
- CDialog::OnInitDialog();
- // TODO: Add extra initialization here
- CComboBox *pCombo;
- for(int i=0; i<10; i++)
- {
- int nCurSel = 0;
- pCombo = (CComboBox*)GetDlgItem(IDC_CMB_EMOTION0 + i);
- {
- for(int j=0; j<EMNUM; j++)
- {
- pCombo->AddString(EMOTIONDEF[j]);
- if(EMOTIONDEF[j] == emotions[i])
- nCurSel = j;
- }
- }
- pCombo->SetCurSel(nCurSel);
- }
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void CDlgOptEmotion::OnOK()
- {
- // TODO: Add extra validation here
- CComboBox *pCombo;
- for(int i=0; i<10; i++)
- {
- pCombo = (CComboBox*)(GetDlgItem(IDC_CMB_EMOTION0 + i));
- pCombo->GetWindowText(emotions[i]);
- }
- CDialog::OnOK();
- }