Re: ExecWB and VARIANT



Actually you don't really have to pass anything in as the 3rd parameter, you
can simply pass NULL, because the SaveAs dialog will come up anyway. If you
specify a filename in the third param, it will show up in the save as
dialogs filename edit.

AliR.


"AliR (VC++ MVP)" <AliR@xxxxxxxxxxxxx> wrote in message
news:aWh8j.53175$eY.10113@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Oops, typo detected! ;)

COleVariant Filename(_T("c:\\Temp.html"));
ExecWB(OLECMDID_SAVEAS,OLECMDEXECOPT_DODEFAULT,Filename,NULL);

AliR.


"AliR (VC++ MVP)" <AliR@xxxxxxxxxxxxx> wrote in message
news:tUh8j.53174$eY.31660@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
How about this:
COleVariant Filename(_T("c:\Temp.html"));

ExecWB(OLECMDID_SAVEAS,OLECMDEXECOPT_DODEFAULT,Filename,NULL);



AliR.



"RAN" <nijenhuis@xxxxxxx> wrote in message
news:0d41348b-658b-470c-9193-b166fb9c8b6e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

In want to use the ExecWB method of the webbrowser activeX control
from microsoft.

void CWebBrowser2::ExecWB(long cmdID, long cmdexecopt, VARIANT* pvaIn,
VARIANT* pvaOut)

I want to SaveAs a webpage using the cmdID = IDM_SAVEAS.
I don't know how to initialise the VARIANT* pvaIn variable to store
the pathname of the file to save the webpage. It is a VT_BSTR and
pbstrVal must be initialised, but i dont know how to initialise a
VARIANT*.

Please help.






.



Relevant Pages

  • Re: ExecWB and VARIANT
    ... I tried to get it to save without the SaveAs dialog and I ... I don't know how to initialise the VARIANT* pvaIn variable to store ... the OK button the program does not return from the ExecWB method, ...
    (microsoft.public.vc.mfc)
  • Re: ExecWB and VARIANT
    ... I don't know how to initialise the VARIANT* pvaIn variable to store ... the OK button the program does not return from the ExecWB method, ... What i want is that ExecWB saves the webpage NOT displaying a SaveAs ...
    (microsoft.public.vc.mfc)
  • Re: completed my Varaint class.
    ... >> I have completed the variant class I have been working on and I wonder ... crap so I am looking into using overloaded template constructors to create ... had supplied an invlaid string parameter, then a null index is created. ... But there's no other way to initialise different types except if the type ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Returning an unknown number of types/values
    ... virtual void setData ... Variant(const Variant& rhs):itsLen),itsArray(new ... I haven't posted it with accessor functions etc as I don't know what you ... strings or do you want to initialise each piece of data individually and how ...
    (alt.comp.lang.learn.c-cpp)