|
-
November 2nd, 2018, 01:34 AM
#1
Messagebox
i am very new to vc++.
how do i print the string entered in the edit box into the message box?i am using
MessageBox("id:","title",MB_OK);
-
November 2nd, 2018, 02:52 AM
#2
Re: Messagebox
 Originally Posted by Ramdhyani
i am very new to vc++.
how do i print the string entered in the edit box into the message box?i am using
MessageBox("id:","title",MB_OK);
1. What type of MessageBox are you going to use? Is it a Win32 API ::MessageBox? Or the CWnd::MessageBox?
And if you are using MFC than why not use the AfxMessageBox?
2. What exactly is your problem? Reading some text from a edit box or putting it into the MessageBox call?
3. There is a lot of examples how to use MessageBox/AfxMessageBox in c++ code: https://www.google.de/search?newwind....0.b3xeIZmR7oc
Victor Nijegorodov
-
November 2nd, 2018, 03:54 AM
#3
Re: Messagebox
 Originally Posted by VictorN
1. What type of MessageBox are you going to use? Is it a Win32 API ::MessageBox? Or the CWnd::MessageBox?
And if you are using MFC than why not use the AfxMessageBox?
2. What exactly is your problem? Reading some text from a edit box or putting it into the MessageBox call?
3. There is a lot of examples how to use MessageBox/AfxMessageBox in c++ code: https://www.google.de/search?newwind....0.b3xeIZmR7oc
i am using AfxMessageBox..
i want to read from the edit and put the same thing back to messagebox
-
November 2nd, 2018, 04:01 AM
#4
Re: Messagebox
 Originally Posted by Ramdhyani
i am using AfxMessageBox..
i want to read from the edit and put the same thing back to messagebox
Post your code that is displaying the edit box. Please use code tags.
-
November 2nd, 2018, 04:32 AM
#5
Re: Messagebox
 Originally Posted by Ramdhyani
i am using AfxMessageBox..
i want to read from the edit and put the same thing back to messagebox
Use the MFC Class Wizard to create a control member variable for the edit control (say, it would be m_myEdit).
Then add this (pseudo)code to read text and display the message:
Code:
CString myText;
m_myEdit.GetWindowText(myText );
AfxMessageBox(myText);
Victor Nijegorodov
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|