0

I have created a basic CHtmlView in an MDI application, that I can use to navigate to Winrar downloading link for example (https://www.win-rar.com/predownload.html?&L=0&Version=32bit).

Once I click on download, the following two dialog box pop out :

Example

What I want to achieve is making the download happen in the background without those two dialog box showing up, Is such thing is possible? and how to achieve it.

Thanks.

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
Annabi Gihed
  • 141
  • 1
  • 7
  • Did you want to show the user the web page or just do the download? I haven't used ChtmlView in over a decade, but. There is also `SetSilent()`, might work. But, if you just want to do a download there is boost::asio or boost::beast. I've used both for downloads. – lakeweb Aug 21 '19 at 18:48
  • 2
    You can use APIs to download directly, [see example](https://stackoverflow.com/a/29552504/4603670) – Barmak Shemirani Aug 21 '19 at 21:09
  • Hi @Barmak Shemirani Thanks for that heads up. So unlike Microsoft to make it look not painful. And an understood cert for https!! – lakeweb Aug 22 '19 at 00:17
  • @lakeweb, yes I want to show a web page more precisely this web view [Example](https://i.imgur.com/jBjokS1.png) In which a Kendo UI Spread Sheet is implemented, this web page offers the user the possibility to download the Spread Sheet by Clicking the icon in the red rectangle. – Annabi Gihed Aug 22 '19 at 07:47
  • @lakeweb And using `SetSilent()`does not prevent the the download dialog box from showing up – Annabi Gihed Aug 22 '19 at 07:59
  • @BarmakShemirani, if I can find away to intercept the message sent when the user click on the download button, I will be able to realize the download in a custom way. – Annabi Gihed Aug 22 '19 at 08:02
  • You can override `OnBeforeNavigate2` – Barmak Shemirani Aug 22 '19 at 13:38

0 Answers0