StaticText控件在ClassWizard能添加么?CStatic类也没有SetWindowText函数!

解决方案 »

  1.   

    可以,有SetWindowText函数,我试过了!!!
      

  2.   

    CStatic是从CWnd继承来了,有SetWindowText函数
      

  3.   

    GetDlgItem is Win32 method.
    Your method is MFC method.
    Both can be possible. Just a custom
      

  4.   

    GetDlgItem is Win32 method.//?这里的GetDlgItem()也是CWnd类中的成员函数
    Your method is MFC method.至于为什么,有可以直接获的得指针,为什么还要用一个庞大的变量呢?
    (节省资源)