GetDlgItemId(id)->Getwindowtext(str);
好象是这样的吧,我不记得函数

解决方案 »

  1.   

    Get the menu of your window first, then use GetMenuString method
    CWnd::GetMenu  
    CMenu* GetMenu( ) const;
    CMenu::GetMenuString 
    int GetMenuString( UINT nIDItem, LPTSTR lpString, int nMaxCount, UINT nFlags ) const;int GetMenuString( UINT nIDItem, CString& rString, UINT nFlags ) const;
      

  2.   

    summer_xzw(雪落黄昏) 说得对,
    GetDlgItem(ID_MYID)->GetWindowText(str);看看MSDN
    CWnd::GetWindowText
    int GetWindowText( LPTSTR lpszStringBuf, int nMaxCount ) const;void GetWindowText( CString& rString ) const;Return ValueSpecifies the length, in bytes, of the copied string, not including the terminating null character. It is 0 if CWnd has no caption or if the caption is empty