About AfxMessageBox
-
VS2005: CString m_strMessageBox; ............. void CHelloDialogDlg::OnBnClickedOk() { UpdateData(TRUE); AfxMessageBox(m_strMessageText); } No any error,But when I click the button,the MessageBox cannot show the string m_strMessageText. Thank you for help!
-
VS2005: CString m_strMessageBox; ............. void CHelloDialogDlg::OnBnClickedOk() { UpdateData(TRUE); AfxMessageBox(m_strMessageText); } No any error,But when I click the button,the MessageBox cannot show the string m_strMessageText. Thank you for help!
-
Does UpdateData() return TRUE? Have you set a breakpoint in your DoDataExchange() function to check that the string is being set from the edit control? Have you set a breakpoint before the message box is called to see what the value of the string is? You should try some basic debugging - it's the best teacher:)
Peter "Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
-
VS2005: CString m_strMessageBox; ............. void CHelloDialogDlg::OnBnClickedOk() { UpdateData(TRUE); AfxMessageBox(m_strMessageText); } No any error,But when I click the button,the MessageBox cannot show the string m_strMessageText. Thank you for help!
Have you entered in the message in message map
BEGIN_MESSAGE_MAP END_MESSAGE_MAP
Regards, Paresh. -
VS2005: CString m_strMessageBox; ............. void CHelloDialogDlg::OnBnClickedOk() { UpdateData(TRUE); AfxMessageBox(m_strMessageText); } No any error,But when I click the button,the MessageBox cannot show the string m_strMessageText. Thank you for help!
-
call UpdateData(FALSE) instead UpdateData(TRUE)
void CHelloDialogDlg::OnBnClickedOk() { UpdateData(FALSE); AfxMessageBox(m_strMessageText); }
-- modified at 1:35 Thursday 29th March, 2007Zo.Naderi-Iran
zon_cpp wrote:
call UpdateData(FALSE) instead UpdateData(TRUE)
To retrieve data from the control we have to pass TRUE, so UpdateData(TRUE) is correct.
Do your Duty and Don't expect the Result
Rate this Post, if I helped You -
zon_cpp wrote:
call UpdateData(FALSE) instead UpdateData(TRUE)
To retrieve data from the control we have to pass TRUE, so UpdateData(TRUE) is correct.
Do your Duty and Don't expect the Result
Rate this Post, if I helped You -
Does UpdateData() return TRUE? Have you set a breakpoint in your DoDataExchange() function to check that the string is being set from the edit control? Have you set a breakpoint before the message box is called to see what the value of the string is? You should try some basic debugging - it's the best teacher:)
Peter "Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
-
No prob, every body do mistake :).
Do your Duty and Don't expect the Result
Rate this Post, if I helped You