ideallic 2015-03-20 05:13 采纳率: 66.7%
浏览 1939

GetDlgItem(IDC)->SetWindowText(strsampletime)

GetDlgItem(IDC_TIMES)->SetWindowText(strsampletime)报错,错误如下:
C:\Users\Administrator\Desktop\圆盘检测\StillCap\StillCapDlg.cpp(134) : error C2660: 'GetDlgItem' : function does not take 1 parameters
C:\Users\Administrator\Desktop\圆盘检测\StillCap\StillCapDlg.cpp(134) : error C2227: left of '->SetWindowTextA' must point to class/struct/union

但是我重新建立一个工程,输入 GetDlgItem(IDC_TIMES)->SetWindowText(strsampletime);,不报错,成功了,
请问这是什么原因引起的?该如何解决?

  • 写回答

4条回答 默认 最新

  • threenewbee 2015-03-20 05:18
    关注

    你调用的是API的GetDlgItem
    应该是this->GetDlgItem(IDC)->SetWindowText(strsampletime)

    评论

报告相同问题?