开发者

help with the edit box/Input Box

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜