- UID
- 3375
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-3-28
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2002-4-24 03:01:50
|
显示全部楼层
为什么会退出ARX时出现unhandled exception c0000005?
为什么会退出ARX时出现unhandled exception c0000005(Access violation reading 0Xcccccce8) at address 6bc418d8h)
The following is the code:
#include "stdafx.h"
#include "MyExam07Dlg.h"
#include "exam07.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
MyExam07Dlg::MyExam07Dlg(CWnd* pParent /*=NULL*/)
: CAcUiDialog(MyExam07Dlg::IDD, pParent)
{
//{{AFX_DATA_INIT(MyExam07Dlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void MyExam07Dlg::DoDataExchange(CDataExchange* pDX)
{
CAcUiDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_EDIT_YPT, m_ctrlYPtEdit);
DDX_Control(pDX, IDC_EDIT_XPT, m_ctrlXPtEdit);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(MyExam07Dlg, CAcUiDialog)
//{{AFX_MSG_MAP(MyExam07Dlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BOOL MyExam07Dlg::OnInitDialog()
{
SetDialogName("exam07:MyExam07Dlg");
CAcUiDialog::OnInitDialog();
DLGCTLINFO dlgSizeInfo[]= {
{ IDC_STATIC_GROUP1, ELASTICX, 20 },
{ IDC_STATIC_GROUP1, ELASTICY, 100 },
{ IDC_EDIT_XPT,ELASTICX, 20 },
{ IDC_EDIT_YPT,ELASTICX, 20 },
{ IDC_EDIT_ZPT,ELASTICX, 20 },
{ IDC_EDIT_ANGLE, ELASTICX, 20 },
{ IDC_STATIC_GROUP2, MOVEX, 20 },
{ IDC_STATIC_GROUP2, ELASTICY, 100 },
{ IDC_STATIC_GROUP2, ELASTICX, 80 },
{ IDC_LIST_BLOCKS, MOVEX, 20 },
{ IDC_LIST_BLOCKS, ELASTICY, 100 },
{ IDC_STATIC_TEXT2,MOVEX, 20 },
{ IDC_STATIC_TEXT2,MOVEY, 100 },
{ IDC_LIST_BLOCKS, ELASTICX, 80 },
{ IDC_STATIC_TEXT2,ELASTICX, 80 },
{ IDC_STATIC_GROUP3, MOVEY, 100 },
{ IDC_STATIC_GROUP3, ELASTICX, 20 },
{ IDC_COMBO_REGAPPS, MOVEY, 100 },
{ IDC_COMBO_REGAPPS, ELASTICX, 20 },
{ IDC_STATIC_TEXT3,MOVEY, 100 },
{ IDC_STATIC_TEXT3,ELASTICX, 20 },
{ IDOK,MOVEX, 100 },
{ IDCANCEL, MOVEX, 100 },
};
const DWORD numberofentries =
sizeof dlgSizeInfo / sizeof DLGCTLINFO;
SetControlProperty(dlgSizeInfo, numberofentries);
m_ctrlXPtEdit.SetRange(-50.0, 50.0);
m_ctrlYPtEdit.SetRange(-50.0, 50.0);
SetWindowText("forrest Line");
return TRUE;
}
void MyExam07Dlg::OnOK()
{
CAcUiDialog::OnOK();
} |
|