开发者

help with the edit box/Input Box

开发者 https://www.devze.com 2023-03-26 02:15 出处:网络
I created a simple dialog with a label and edit box, then created a class, CInputDlg, added member variables for the label and edit box, andcalled it

I created a simple dialog with a label and edit box, then created a class, CInputDlg, added member variables for the label and edit box, and called it

CInputDlg dialog
dialog.m_label = TEXT("Enter a number:");
if (dialog.DoModal() == IDOK) {
  // Do som开发者_运维知识库ething
}

Now how do I display the text which is entered into the edit box?


Try WM_GETTEXT

http://msdn.microsoft.com/en-us/library/ms632627(v=VS.85).aspx


In the Handler for the OK button on the Dialog, you should get the TextBox.GetText(), and put it back into a public CString member m_InputString. Then, from the calling function, you can read dialog.m_InputString.

0

精彩评论

暂无评论...
验证码 换一张
取 消