CVI project
I am trying to save images either (jpg or png) from web pages to a local drive i have tried using the inet.fp and can successfully load the jpeg from a url to a panel containing an activex webcontroller item. The jpeg is displayed correctly using :
GetObjHandleFromActiveXCtrl (phMap2, pMap2_WEBBROWSER,&webHandle); Fmt (strUrl, "%s<%s","http://website", ".png"); inet = INET_IWebBrowser2Navigate (webHandle, NULL, strUrl, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL);
using the following command i can save the file but am always prompted with the file save as pop up
INET_IWebBrowser2ExecWB (webHandle, NULL, INETConst_OLECMDID_SAVEAS, INETConst_OLECMDEXECOPT_DODEFAULT, CA_VariantNULL(), &vOut);
is it possible to fix the file path and filename so this process can be automated ? or is there a better way of doing this ?
Aucun commentaire:
Enregistrer un commentaire