Hi,
I am trying to open a url when users click on the window.
ShellExecute(NULL,_T("open"),_T("
http://www.google.com"),NULL,NULL, SW_SHOWNORMAL);
this works perfectly fine....
but what i am trying to do is, that i want to take input from the user and then append this input to the url...
basically
string fileName = "";
cout<<"enter file name: ";
cin>>fileName;
then i want to to append this file name to the url.
so i have tried this but not working.
string url = "
http://www.google.com";
url = url + fileName;
and i have passed this to the above ShellExecute function.
ShellExecute(NULL,_T("open"),url,NULL,NULL, SW_SHOWNORMAL);
Can any one tell me why? and can any one tell me how to append values or convert string to _TCHAR * variable.
i know the url is suppose to be a _TCHAR type variable but i do not know how to convert it or append a string to it.
Thanking in anticipation.
Regards,
Hajidon