Reputation: 429
I am taking the URL value from DocumentComplete and try to copy it to testDest[256]
Here is my code:
char *p= _com_util::ConvertBSTRToString(url->bstrVal);
for (int i = 0; i <= strlen(p); i++)
{
testDest[i] = p[i];
}
My question is, how can I print the testDest
value on a messagebox?
Upvotes: 1
Views: 4062
Reputation: 70721
The simplest way to create a message box is this:
MessageBox(NULL, testDest, "some title", 0);
If you already have a window and you want to associate the message box with that window, just change the first parameter from NULL
to the window handle.
Also, if you're using Unicode, you should convert your char []
to TCHAR []
or otherwise call the ANSI version (MessageBoxA
) explicitly.
Upvotes: 2