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?
The simplest way to create a message box is this:
If you already have a window and you want to associate the message box with that window, just change the first parameter from
NULLto the window handle.Also, if you’re using Unicode, you should convert your
char []toTCHAR []or otherwise call the ANSI version (MessageBoxA) explicitly.