GetDlgItem(IDC_STATIC2)->SetWindowText("连接地址");
这样出错

解决方案 »

  1.   

    c:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\wenjianchuansong\wenjianchuansongDlg.cpp(177): error C2227: “->SetWindowTextA”的左侧必须指向类/结构/联合
    c:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\wenjianchuansong\wenjianchuansongDlg.cpp(177): error C2065: “IDC_STATIC2” : 未声明的标识符ID明明是IDC_STATIC2呀
      

  2.   

    还有,没法给static控件添加变量
      

  3.   

    看看你Dlg上有没有IDC_STATIC2这个ID,在看看是不是这个上面有错误