I have a small issue with COM. I wrote a console program with COM, which opens Internet Explorer hidden to the user and operates on a backoffice. Well, the problem is that when send a " click " on a link with " PostMessage ", a new tab opens and the browser becomes visible. ¿Why is this happening? ... ¿Can I prevent this behavior?.
hr = CoInitialize(NULL);
cout << "Error ConInitialize\n";
hr = CoCreateInstance(CLSID_InternetExplorer,
cout << "Error CoCreateInstance\n";
hr = pwb2->put_Visible(VARIANT_FALSE); // Turn on hidden, works fine.
cout << "Error blah blah\n";
After that I get the document and I send a click on a link with PostMessage and opens a new tab, but the browser becomes visible. ¿¿Why is that?? ¿¿How I can fix it??
Thanks any help. :)