比如点一个界面有两个按钮,点按钮1改变按钮2上的字

解决方案 »

  1.   

    GetDlgItem(***)->SetWindowText("***")
      

  2.   

    SetDlgItemText(IDC_BUTTON2, _T("..."));
      

  3.   

    都只能通过函数访问么?不可以像vb那种command.caption 这样?
      

  4.   

    GetDlgItem(IDC_XXX)->SetWindowsText(xxxx);
      

  5.   

    你派生个类,自己绘就OK~ 设置一个PUBLIC的变量caption ,绘制从caption取值并显示。
      

  6.   

    两种方法:
    1、就如楼上的GetDlgItem(***)->SetWindowText("***")
    2、给你的控件定义一个名称,直接操作m_name.SetWindowText("***")