vikasgkutty
asked on
easy question on MessageBox
How can i use the MessageBox to print something like this?
MessageBox("You Pressed %c", pressedchar);
MessageBox("You Pressed %c", pressedchar);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think an easier way is like this
CString s;
s.Format("You pressed %c",PressedChar);
MessageBox(s);
what do u say?
CString s;
s.Format("You pressed %c",PressedChar);
MessageBox(s);
what do u say?
Why don't you just do it the easy way, using a CString that is formatted with CString::Format (similar flags to printf), then pass this CString to the messagebox ?
Hehe, looks like you agree with that then ;)
MessageBox will work only inside a CWnd derived object.
use AfxMessageBox() instead.
use AfxMessageBox() instead.
ASKER