Hi, there!
I'm in deep trouble with that nasty WebBrowser!
All I want to do is to create some
HTML-based presentation pages in an dialog-based application that has an WebBrowser ActiveX control in it.
And I wish all those pages loaded from resources so I could distribute only the executable file,
without any other .htm files.
The piece of code that loads my HTMLs is this:
CxxxDlg::OnInitDialog(...)
{
....................
COleVariant* p_url=new COleVariant(CString("C:\\My Projects\\XxxApp\\Slides\\welcome.htm");
COleVariant noVariant;
m_ie.Navigate2(p_url,&noVariant,&noVariant,&noVariant,&noVariant);
delete p_url;
....................
}
Everything works just fine!
But I have to distribute the "welcome.htm" together with my .exe and this is something that I don't like.
(A few months ago I have created an SDI app whose View class was derived from CHtmlView and
that class ( CHtmlView ) had a simple function called LoadFromResource(UINT id) that
did the job for me, BUT the WebBrowser control that comes with VC++ 6.0 DOESN'T HAVE THAT
FUNCTION, so I tried to load it somehow else, but I'm giving up! And I'm sure there's something
simple but I can't figure out WHAT ????????)
That's the first part of the problem. The second one is this: let's suppose that somehow I managed to
load an HTML-resource named IDR_FIRST_HTML. What code should this IDR_FIRST_HTML contain inside it
so that it could link to another HTML-resource named IDR_SECOND_HTML?
<A HREF="?????????????????">Go to next Page</A>
Please if you had the time then try to write a simple DIALOG BASED app that does this and
maybe you could send it to me, or if you hadn't the necessary time I would be pleased just with
that piece of code with the right modifications and the <A>...</A> tag implementation.
Thank you in advance!
I'm in deep trouble with that nasty WebBrowser!
All I want to do is to create some
HTML-based presentation pages in an dialog-based application that has an WebBrowser ActiveX control in it.
And I wish all those pages loaded from resources so I could distribute only the executable file,
without any other .htm files.
The piece of code that loads my HTMLs is this:
CxxxDlg::OnInitDialog(...)
{
....................
COleVariant* p_url=new COleVariant(CString("C:\\My Projects\\XxxApp\\Slides\\welcome.htm");
COleVariant noVariant;
m_ie.Navigate2(p_url,&noVariant,&noVariant,&noVariant,&noVariant);
delete p_url;
....................
}
Everything works just fine!
But I have to distribute the "welcome.htm" together with my .exe and this is something that I don't like.
(A few months ago I have created an SDI app whose View class was derived from CHtmlView and
that class ( CHtmlView ) had a simple function called LoadFromResource(UINT id) that
did the job for me, BUT the WebBrowser control that comes with VC++ 6.0 DOESN'T HAVE THAT
FUNCTION, so I tried to load it somehow else, but I'm giving up! And I'm sure there's something
simple but I can't figure out WHAT ????????)
That's the first part of the problem. The second one is this: let's suppose that somehow I managed to
load an HTML-resource named IDR_FIRST_HTML. What code should this IDR_FIRST_HTML contain inside it
so that it could link to another HTML-resource named IDR_SECOND_HTML?
<A HREF="?????????????????">Go to next Page</A>
Please if you had the time then try to write a simple DIALOG BASED app that does this and
maybe you could send it to me, or if you hadn't the necessary time I would be pleased just with
that piece of code with the right modifications and the <A>...</A> tag implementation.
Thank you in advance!