[英]How to programmatically change browser URL
In my C++ Windows application I use ShellExecute to open a remote PDF file in the internet browser at a certain PDF Destination (dynamic bookmarks provided by Adobe Acrobat Reader): In my C++ Windows application I use ShellExecute to open a remote PDF file in the internet browser at a certain PDF Destination (dynamic bookmarks provided by Adobe Acrobat Reader):
ShellExecute(NULL, "open", "https://www.myweb.cloud/guide.pdf#dest_1", NULL , NULL, SW_SHOWNORMAL);
Then if I want to move to another Destination, another call to ShellExecute (with #dest_2 in the URL) simply open another page in the browser and download the PDF again opening it at that Destination.然后,如果我想移动到另一个目的地,对 ShellExecute 的另一个调用(在 URL 中带有#dest_2)只需在浏览器中打开另一个页面并下载 PDF 再次在该目的地打开它。
Is there a way to programmatically change the URL (from #dest_1 to #dest_2) without making the browser to open a new page e re-dowload the PDF?有没有办法以编程方式更改 URL(从 #dest_1 到 #dest_2)而不使浏览器打开新页面并重新下载 PDF?
I also use LibCurl in my application in order to retrieve data from remote servers.我还在我的应用程序中使用 LibCurl 来从远程服务器检索数据。 Can I reach my goal with LibCurl?
我可以用 LibCurl 实现我的目标吗? If so, could you plese show me a code sample?
如果是这样,你能给我看一个代码示例吗?
Thanks in advance.提前致谢。
ShellExecute
are always opened in a new tab by default.ShellExecute
打开的外部链接始终在新选项卡中打开。 Chrome can't change this behavior. ShellExecute
.ShellExecute
在某个应用程序中打开它。 You just need to find an application, that is suitable to your requirements.sumatrapdf -reuse-instance
seem to be suitable for you.sumatrapdf -reuse-instance
似乎适合您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.