- 论坛徽章:
- 0
|
请各位大侠帮帮忙,谢谢。
问题是这样的:
我VC6。0做的,因为原代码做的界面往下显示的过长,我就想加个TabControl控件老实现分页显示。添加这个控件好了。但是在往每分页(我分了4页,每页实现的功能一样)添加相应的控件实现代码后运行报错:Unhandled exception in .exe 0xC0000005 access violation,调试的指向位置代码是:
int CCheckadslDlg::init_histogram_control()
{
CRect rect_cpu;
GetDlgItem(IDC_STATIC_HISTOGRAM_CPU)->GetWindowRect(rect_cpu);
ScreenToClient(rect_cpu);
m_HistogramCtrl_cpu.Create(WS_VISIBLE | WS_CHILD, rect_cpu, this, 100);
m_HistogramCtrl_cpu.SetRange(0, 100);
CRect rect_down;
GetDlgItem(IDC_STATIC_HISTOGRAM_DOWNLOAD)->GetWindowRect(rect_down);//指向的这里
ScreenToClient(rect_down);
m_HistogramCtrl_down.Create(WS_VISIBLE | WS_CHILD, rect_down, this, 100);
m_HistogramCtrl_down.SetRange(0, m_scale);
CRect rect_down1;
GetDlgItem(IDC_STATIC_HISTOGRAM_DOWNLOAD2)->GetWindowRect(rect_down1);
ScreenToClient(rect_down1);
m_HistogramCtrl_down1.Create(WS_VISIBLE | WS_CHILD, rect_down1, this, 100);
m_HistogramCtrl_down1.SetRange(0, m_scale1);
找了好久没找出问题,大家帮帮新手。非常感谢! |
|