程序卡?什么意思?
要不你在win7下编译试试
难道是一些dll不兼容的问题,
最好你能够打印日志或者用二分法隔离模块功能
定位到底是什么导致的
我估计是你程序本身写的有问题
我们项目都是xp win7 200 2003下面跑测试
不过这些操作系统间DLL会不兼容哦

解决方案 »

  1.   

    我今天试试呀,我这个项目是老师的,就是用MFC做一个界面控制下位机(单片机430),程序是在xp上编写的,然后在win7上打开会卡一会儿,里面的功能按钮按下有时候会卡死。谢谢哈
      

  2.   

    程序打LOG日志这样来,观察每一条日志的时间间隔,才能找到原因所在。 也许是你的程序本身的健壮性不高,WIN 7系统相对于XP是做了优化的,也不排除兼容的问题
      

  3.   

    会不会是画图的问题,大神帮我看看程序是不是有问题
    void CGUOGUOView::OnInitialUpdate()
    {
    CFormView::OnInitialUpdate();
    GetParentFrame()->RecalcLayout(); ResizeParentToFit();
    ReadConfig();
    ReadZeroFile();
    //SunLoc();
    CWnd* pWnd1;
    CWnd* pWnd2;
    CWnd* pWnd3;
    CWnd* pWnd4;
    CTimeSpan timeDelay(0,8,0,0);
    CTime today = CTime::GetCurrentTime(); pWnd1= GetDlgItem(IDC_STATIC_SUNTRACE);
    CRect rect;
    pWnd1 ->GetWindowRect(&rect);
    ScreenToClient(&rect);
    plotSun.Create(WS_VISIBLE | WS_CHILD,rect,this,1004);
    plotSun.SetDateTime(CTime::GetCurrentTime());

    m_DemoSpeed.SetRange(10,1999);

    m_proinfo.SetRange(0,1000);
    m_proinfo.SetPos(0);
    SetTimer(3,1000,NULL);

    double minrange=0.0;
    double maxrange=4.0;
    pWnd2 = GetDlgItem(IDC_STATIC_GRAPH);
    pWnd2 ->GetWindowRect(&rect);
    ScreenToClient(&rect);
    plotWnd1.m_lMaxDataPrSerie = 1200;
    plotWnd1.lArraySize = 1200; // only points with differebt x,y will be put into the array
    plotWnd1.Create(WS_VISIBLE | WS_CHILD  ,rect,this,1019);
    plotWnd1.SetSerie(1, PS_SOLID, RGB(0,0,255), 0.0, 100.0, "Pressure");
    plotWnd1.SetLegend(1, PS_SOLID, RGB(0,0,255), "太阳天线温度");
    plotWnd1.SetBXTitle("协调世界时(UTC)");

    plotWnd1.SetLYRange(minrange,maxrange);
    plotWnd1.m_bAxisRY = false;
    plotWnd1.m_bAutoScrollX=TRUE;
    pWnd3 = GetDlgItem(IDC_STATIC_GRAPH2);
    pWnd3 ->GetWindowRect(&rect);
    ScreenToClient(&rect);
    plotWnd2.m_lMaxDataPrSerie = 36000;
    plotWnd2.lArraySize = 36000; // only points with differebt x,y will be put into the array
    plotWnd2.Create(WS_VISIBLE | WS_CHILD  ,rect,this,1020);
    plotWnd2.SetSerie(2, PS_SOLID, RGB(0,0,255), 0.0, 100.0, "Pressure");
    plotWnd2.SetLegend(2, PS_SOLID, RGB(0,0,255), "太阳天线温度");
    CTime startTime(today.GetYear(),today.GetMonth(),today.GetDay(),8,0,0);
    CTime endTime(today.GetYear(),today.GetMonth(),today.GetDay(),18,0,0);
    plotWnd2.SetBXRange(startTime-timeDelay,endTime-timeDelay);
    plotWnd2.SetBXTitle("协调世界时(UTC)");
    plotWnd2.SetLYRange(minrange,maxrange);
    plotWnd2.m_bAxisRY = false;
    plotWnd2.m_bAutoScrollX=false;
    Invalidate();
    GetDlgItem(IDC_BUTTON_SYN) ->EnableWindow(false);
    m_wndToolBar.ShowWindow(SW_HIDE);}
      

  4.   

    通讯和,驱动没问题,在xp上打开就没问题,在win7上打开就成这样了
      

  5.   

    试试 xp sp3兼容模式运行  (不懂就百度)