- 积分
- 159
- 明经币
- 个
- 注册时间
- 2002-11-20
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
ScaleDlg.h文件内容:
#if !defined(AFX_SCALEDLG_H__883BC861_1336_11D7_A714_885276570047__INCLUDED_)
#define AFX_SCALEDLG_H__883BC861_1336_11D7_A714_885276570047__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ScaleDlg.h : header file
//
#include "resource.h"
#include <adslib.h>
#include <adui.h>
#include <acui.h>
/////////////////////////////////////////////////////////////////////////////
// CScaleDlg dialog
class CScaleDlg : public CAcUiDialog
{
// Construction
public:
CScaleDlg(CWnd* pParent = NULL); // standard constructor
void DisplayComboBox();
// Dialog Data
//{{AFX_DATA(CScaleDlg)
enum { IDD = IDD_DIALOG1 };
CAcUiSymbolComboBox m_x;
CAcUiSymbolComboBox m_y;
CAcUiSymbolComboBox m_p;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CScaleDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CScaleDlg)
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SCALEDLG_H__883BC861_1336_11D7_A714_885276570047__INCLUDED_)
ScaleDlg.cpp文件内容:
// ScaleDlg.cpp : implementation file
//
#include "StdAfx.h"
#include "ScaleDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CScaleDlg dialog
CScaleDlg::CScaleDlg(CWnd* pParent /*=NULL*/)
: CAcUiDialog(CScaleDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CScaleDlg)
//}}AFX_DATA_INIT
}
void CScaleDlg::DoDataExchange(CDataExchange* pDX)
{
CAcUiDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CScaleDlg)
DDX_Control(pDX, IDC_COMBO_X, m_x);
DDX_Control(pDX, IDC_COMBO_Y, m_y);
DDX_Control(pDX, IDC_COMBO_P, m_p);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CScaleDlg, CAcUiDialog)
//{{AFX_MSG_MAP(CScaleDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CScaleDlg message handlers
BOOL CScaleDlg::OnInitDialog()
{
CAcUiDialog::OnInitDialog();
// TODO: Add extra initialization here
DisplayComboBox();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void DisplayComboBox()
{
m_x.InsertString(-1,"good");
}
编译出现:
d:\LX\scale\ScaleDlg.cpp(55) : error C2065: 'm_x' : undeclared identifier
d:\LX\scale\ScaleDlg.cpp(55) : error C2228: left of '.InsertString' must have class/struct/union type
这是为什么?为什么m_x已经在ScaleDlg.h文件中定义过,而在ScaleDlg.cpp的
void DisplayComboBox()
{
m_x.InsertString(-1,"good");
}
中,却不认可?
请各位高手帮助一下,谢谢!
e_mail:msd0819@mail.dlptt.ln.cn |
|