0

Hello,

i am searching for way, to open web page with C++ and after that to control its elements. I know that i can do this in Delphi, with WebBrowser.OleObject.Document and TWebBrowser. Do you know similar way that i can use in C++?

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by marco93
0

Hello,

i am searching for way, to open web page with C++ and after that to control its elements. I know that i can do this in Delphi, with WebBrowser.OleObject.Document and TWebBrowser. Do you know similar way that i can use in C++?

I searched on net and found some solution. Though i havent tried it, it might help you to start. Please find code below

#include <iostream>
#include <windows.h>
#include <string>
using namespace std;

int main()
{
    char* google("http://www.google.com");  //initial link
    char* temp;
    
   cout<<"Give name: ";      //the thing i want to add after
   cin>>temp;
   strcat(google,temp);       //concat link with the name and
   strcat(google,".jpg");     //put the jpg to see the image
   ShellExecute(NULL, "open",google,NULL, NULL, SW_SHOWNORMAL); //this script is from a snippet in this side
}
0

This code gives me error:

error C2664: 'ShellExecuteW' : cannot convert parameter 2 from 'const char [5]' to 'LPCWSTR'
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.