“不知道改怎么输入数据”是什么意思?
要得到可以用GetWindowText()呀

解决方案 »

  1.   

    比如我想输入3个人名,输入一个后,按enter键,这个名字就被记录,并且edit为空,然后我可以输入第二个,。。输入完后,当每点击一次边上的按钮时,在edit中出现一个名字,怎么实现这个功能?
      

  2.   

    GetDlgItemText()
    SetDlgItemText()GetDlgItemText
    The GetDlgItemText function retrieves the title or text associated with a control in a dialog box. UINT GetDlgItemText(
      HWND hDlg,       // handle of dialog box
      int nIDDlgItem,  // identifier of control
      LPTSTR lpString, // address of buffer for text
      int nMaxCount    // maximum size of string
    );
     
    Parameters
    hDlg 
    Identifies the dialog box that contains the control. 
    nIDDlgItem 
    Specifies the identifier of the control whose title or text is to be retrieved. 
    lpString 
    Pointer to the buffer to receive the title or text. 
    nMaxCount 
    Specifies the maximum length, in characters, of the string to be copied to the buffer pointed to by lpString. If the length of the string exceeds the limit, the string is truncated. 
    Return Values
    If the function succeeds, the return value specifies the number of characters copied SetDlgItemText
    The SetDlgItemText function sets the title or text of a control in a dialog box. BOOL SetDlgItemText(
      HWND hDlg,         // handle of dialog box
      int nIDDlgItem,    // identifier of control
      LPCTSTR lpString   // text to set
    );
     
    Parameters
    hDlg 
    Identifies the dialog box that contains the control. 
    nIDDlgItem 
    Identifies the control with a title or text that is to be set. 
    lpString 
    Pointer to the null-terminated string that contains the text to be copied to the control. 
    Return Values
    If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError. Res
    The SetDlgItemText function sends a WM_SETTEXT 
      

  3.   

    你好像没有明白我的目的。我是想在“Edit控件”中实现多行输入,并且每一行的浏览可通过边上的按钮实现(Edit的style中multiline和Vertical scroll产生的按钮),输入的时候是人工输入的!
      

  4.   

    给这个控件定义一个控制变量和一个CString变量,并重载OnOk()函数,在该函数里先取出控件的值再清空,就能实现,你试试。
      

  5.   

    自己编写一个EDIT类,从CEdit派生,在消息预处理中处理按键消息。