Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHTML.loadDocument

Status
Not open for further replies.

shetlandbob

Programmer
Mar 9, 2004
528
GB
Hello,

I have a DHTML control in a dialog window and want to load up a document stored locally on my machine.

I've tried looking online and in help areas (MSDN and Studio.NET help) but cant figure this out.

I have a file (say C:\test.html), but cant get it to load using the DHTML.loadDocument(); command? It wants me to pass two VARIANT's as variables??? I would have thought all I would need to pass would be file location (this is how it was in VB6?)

Anyone used this and have any ideas?

I'm using Visual C++.Net for info.

Cheers
 
do something like
...loadDocument(..._variant_t("c:\\test.html")...);

Ion Filipski
1c.bmp
 
for future info this is how it was done:

Code:
  tagVARIANT pathIn;
  tagVARIANT promptUser;
  VariantInit(&pathIn);
  VariantInit(&promptUser);

  CString m_str = "C:\\test.html";

  pathIn.vt = VT_BSTR;
  pathIn.bstrVal = m_str.AllocSysString( );

  promptUser.vt = VT_BOOL;
  promptUser.boolVal = false;
  dhtml.LoadDocument( &pathIn, &promptUser );

  VariantClear ( &pathIn );
  VariantClear ( &promptUser );
 
For future info, how it could be done:
Code:
  _variant_t pathIn;
  _variant_t promptUser;

  CString m_str = "C:\\test.html";
  pathIn = m_str.AllocSysString( );
  dhtml.LoadDocument( &pathIn, &promptUser );

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top