dycdyc11 发表于 2008-5-9 20:24

高手来答问题

出现错误!
File:aflwin2.inl
line:168

void CP59View::OnTimer(UINT nIDEvent)
{
        // TODO: Add your message handler code here and/or call default
        m_width+=5;       
        CClientDC dc(this);
       
        TEXTMETRIC tm;
        dc.GetTextMetrics(&tm);
        CRect rect;
        rect.left=0;
       
        rect.top=500;

        rect.right=m_width;
        rect.bottom=tm.tmHeight+rect.top;
        dc.SetTextColor(RGB(0,255,0));
        CString str;
        str.LoadString(IDS_DRAW_DYC);
       
        dc.DrawText(str,rect,DT_LEFT);

        CView::OnTimer(nIDEvent);
}

sunkaidong 发表于 2008-5-9 22:28

你写的定时器?你要把你代码哪报错了发一下啊..呵呵,标注出来

dycdyc11 发表于 2008-5-10 17:18

运行时出错
File:afxwin2.inl
Line:168


        _AFXWIN_INLINE UINT CWnd::SetTimer(UINT nIDEvent, UINT nElapse,
                void (CALLBACK* lpfnTimer)(HWND, UINT, UINT, DWORD))
        { ASSERT(::IsWindow(m_hWnd)); return ::SetTimer(m_hWnd, nIDEvent, nElapse,
                (TIMERPROC)lpfnTimer); }
那的错误我不太清楚

[[it] 本帖最后由 dycdyc11 于 2008-5-10 17:33 编辑 [/it]]

页: [1]

编程论坛