Reputation: 6817
How to correctly print a CString to messagebox? There is nothing appear..
CString testing;
testing = ExecuteExternalProgram();
MessageBox(NULL, testing, L"test", MB_OK);
Upvotes: 1
Views: 4059
Reputation: 136
try AfxMessageBox.
http://msdn.microsoft.com/en-us/library/as6se7cb(v=vs.71).aspx
lpszText Points to a CString object or null-terminated string containing the message to be displayed in the message box.
or do:
MessageBox(NULL, testing.GetBuffer(), L"test", MB_OK);
Upvotes: 2