|
Nice link! Thanks...
But do you know if installing it will interfere with the existing .Net 1.1 installation and tools I already have installed. I get nervous about these things, since they almost always break something seriously.
"My kid was Inmate of the Month at Adobe Mountain Juvenile Corrections Center" - Bumper Sticker in Bullhead City
|
|
|
|
|
Hello everyone,
This project is for windows clients it consists of a bunch of maps and a keymap. I am doing image mapping on keymap, when you select an area of the keymap it brings up the associated large map in your browser window. What I need to do after that is insert some kind of code that after they verfify that the street is on the map they selected, that they can click a link (here comes the tricky part that I need help on) I want windows explorer to open and point to the tif image associated with the map. If you just use for instance [code]m:\maps\tif\sr1.tif[/code] it will ask you to download the file. I dont want that. I want windows explorer to come up and open the directory showing the tif file so the user can drag it into a autocad drawing.
Thanks for the help guys.
Lee
|
|
|
|
|
Have you tried using the 'file' protocol that IE supports?
Try the following:
Make a file on your C drive called data.txt with random text in it, then save it.
Come up with a static HTML page called test.htm that looks like this:
Have it look like this
<br />
<html><br />
<head><title>Test</title></head><br />
<body><br />
<a target="_blank" href="file://C:\data.txt">Data.txt</a><br />
</body><br />
</html><br />
Open the file using IE, then click on the Data.txt link. Is this what you are looking for? To display a directory, remove the file name from the href "file://C:\".
Hope this helps!
~javier lozano
(blog || email)
|
|
|
|
|
hi!
i've a commandline encoder which i can execute using VC, i wonder if anyone knows how i can add it to my web site?
|
|
|
|
|
Hi, I'm suing ASP and connect to Access database. When I submit the data from an HTML form to the database it display the following error message: cannot update database or object read only. Does anybody know about the source of this problem? why it display this message?
Roath Kanel
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I am developing a MFC (VC++ 6) application which should be able to display some dynamic HTML content.
The HTML page has some static elements and some dynamic elements so I want to use DHTML.
I want to use a static HTML template and let my MFC application fill in the dynamic content. To display the HTML page I will use the IE browser component (or the MFC wrapper from Gary R. Wheeler http://www.codeproject.com/miscctrl/simplebrowserformfc.asp)
The problem which I have is: how can I access the dynamic HTML content (DOM) of my template and fill in my content using MFC.
Is there a DOM/DHTML parser?
I found a lot of information in the internet and in the MSDN library, but I could not find a good startig point.
Can anyone give me some hints or direct me into the correct direction? At least a starting point would help me a lot.
Thanks in advance.
|
|
|
|
|
Hi,
So are you saying that you want to Navigate() to your static HTML page (template) and then you want to start populating the contents of the page using MFC?
Andy
|
|
|
|
|
Thanks for your answer Andy, it's exactly what you say.
Today I have found a solution. I can get a IHTMLDocument pointer. So I have access to the HTML code.
But that leads me to another question. How can I insert an image into the HTML code which is in memory and not on HD.
Must I save the image to a file in order to insert it into the HTML document or is there an other way?
|
|
|
|
|
Hi,
Yes indeed IHTMLDocumentPtr is the starting point into the DOM.
One thing that will help in the long run is to import the HTML type library - thus getting Visual Studio to generate wrappers around the numerous interfaces and methods. It wraps using smart pointers - so no QueryInterface/Releases to take care of.
e.g. insert the following into either your header/implementation file
#import "C:\Windows\system32\mshtml.tlb" no_auto_exclude
This will generate two files, mshtml.tlh and mshtml.tli, in your project directory. The first is a header file, the next the implementation. With this done, here is a simple DHTML process from within MFC to get an element from the page...
void CWebDlg::OnDocumentCompleteExplorer1(LPDISPATCH pDisp, VARIANT FAR* URL)
{
USES_CONVERSION;
MSHTML::IHTMLDocument2Ptr spDoc(m_ctlWeb1.GetDocument());
if (spDoc)
{
MSHTML::IHTMLDocument3Ptr spDoc3 = spDoc;
if (spDoc3)
{
MSHTML::IHTMLElementPtr spElem2 = spDoc3->getElementById(_bstr_t("idSpan1"));
if (spElem2)
{
CString strText = W2T(spElem2->innerText);
spElem2->innerText = _bstr_t("Hello There");
}
}
}
}
See how we can easily get the different interfaces of the object. The wrapper is doing the QI under the covers when we do a simple assignment. Plus the smart pointer will release that reference once the object goes out of scope.
You can also easily create elements at will, e.g. here we create a BGSOUND element and append it to the DOM document.
MSHTML::IHTMLDocument2Ptr spDoc(m_ctlWeb1.GetDocument());
if (spDoc)
{
MSHTML::IHTMLElementPtr spElem = spDoc->createElement(_T("BGSOUND"));
if (spElem)
{
MSHTML::IHTMLBGsoundPtr spBG = spElem;
if (spBG)
{
CString strURL = _T("http://xyzxyz/snd/newalert.wav");
spBG->put_src((bstr_t)strURL);
MSHTML::IHTMLDOMNodePtr spBody = spDoc->body;
MSHTML::IHTMLDOMNodePtr spNode2Add = spBG;
spBody->appendChild(spNode2Add);
}
}
}
To answer your question about inserting an image - I not too sure, something at the back of my mind does ring a bell about embedding IMG data in an HTML page. I'll see if I can find out. But for now I would think about saving the image to the file-system and then referencing the IMG src tag to the location.
If you have any questions about DHTML or using MFC to generate DHTML I'll be happy to answer them.
Hope this helps,
Andy
|
|
|
|
|
Thanks for the detailed answer. I think now I have the starting point I need.
But do I need the wrappers if I don't add new HTML elements? My plan is to change existing HTML elements only.
So If I get a pointer like IHTMLElement and change the properties of the object that should be no problem?
The MSHTML documentation in the MSDN library seems also to be very good.
Thanks for your help.
|
|
|
|
|
Hi,
I would always use the wrappers as it will ease the time and readablity of your code. As an example, here is some code without the use of the wrappers:
IUnknown* lpUnk = m_pSite->GetObjectUnknown();
if ( lpUnk != NULL )
{
HRESULT hr;
IHTMLDocument2* pHTMLDocument2;
hr = lpUnk->QueryInterface(IID_IHTMLDocument2, (void **)&pHTMLDocument2);
if ( SUCCEEDED( hr ) )
{
BSTR bstrColor = SysAllocString( buff );
VARIANT varColor;
varColor.vt = VT_BSTR;
varColor.bstrVal = bstrColor;
hr = pHTMLDocument2-> put_bgColor( varColor );
pHTMLDocument2->Release();
}
}
and now the same code with the use of the wrappers:
MSHTML::IHTMLDocument2Ptr spDoc(m_pSite->GetObjectUnknown());
if (spDoc)
{
spDoc->bgColor = bstr_t("#ffffff");
}
As you can see it is substantially cleaner. And this was a simple example.
You can also call any Javascript functions (from MFC) that are in the HTML page (I can show you how if you need to)
And also, you can implement an event handler at the MFC side such that, for example, an onclick HTML event will cause the web browser control to call into your application.
Hope this helps,
Andy
|
|
|
|
|
Thanks again
I will try the wrappers. Since I only want to do some basic things I will not use JavaScript.
The simple browser wrapper for the MS Web Browser control which I use is very good. It already offers message handlers. So this should be easy.
You helped me a lot.
|
|
|
|
|
I'm a newb.... & would like to know a way to run web apps outside the default web container location of tomcat 5.0 in windows 2000....running IIS...
|
|
|
|
|
I have two tables in MSSQL, say a,b , now I am creating a report in crystal with ado having two aliases as ado,ado_1, now ado fields are tagged in report header and ado_1 fields are tagged in details, there is a common field in both ado and ado_1 whic is used for linking, now when i link from ado to ado_1 I can see all the fields of ado, but not of ado_1 in detail, and if i change the link from ado_1 to ado i can see all the fields of ado_1 but not of ado, no complex struc exist, it a plain report
kindly help
vikash
|
|
|
|
|
Hi, I have question to ask all of you. Do you have any method to know all of an e-mail address of each person around the world?
Roath Kanel
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Is this a serious question? Why do you want this information anyway?
The only reason I could think that anyone would want this information is to spam lots of people (well, everybody by the looks of it). SPAM is one of the major irritations of the internet and its perpetuation should be strongly discouraged at every level.
To answer your question: No, you cannot know the "e-mail address of each person around the world". Many people go to great lengths to guard their address and maintain their privacy. You should respect that.
|
|
|
|
|
The reason that I want to know about e-mail address because most of my friend when finish the university are go to work in a difference places without let me know even their telephone number. We ask the university many time but it seem no result. I just want to know if their is a software or webpage when I type my friend name, it will display an e-mail address to contact them (if they register the name ex: hotmail, yahoo).
I know that personal privacy must be respect, but I don't want to know the other personal privacy even my friend. I just want to know the way to contact them.
Roath Kanel
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Unless they have registered somewhere then no. Also, if they have not given you their contact details I would question their level of commitment as friends.
Google for your friend's name, they may have posted their email address somewhere, or have some other way of contacting them. Websites like friends reunited (not available yet in Norway or Cambodia) allow people to post details of where they went to school and for a nominal fee you can contact each other through the site.
|
|
|
|
|
Thank you very much, I have some idea about it. I use google to search but there is no result. All of us are best freind, I need to wait from the university if there are any result.
Roath Kanel
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Not unless your Professor Xavier and you know how to work that cerybro mind reading machine
How do I print my voice mail?
|
|
|
|
|
|
Hi all,
i dont want a horizontal bar in my html page i dont have any frame in my page but i want to remove horizontal bar is there any code for that. i am using tables which width = 100% but it show me a bar is there any solution for that. please give me any code.
thanking you
|
|
|
|
|
Anonymous wrote:
i am using tables which width = 100%
Ummm.... try 90%
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Hi all,
I working on a site which is maid in pure HTML. I want to send a mail throug my site. but i dont know how to send it. may i have use any service like SMTP or there is any other way to send mail by pure html. Do u have any source code?
please give me reply as early as possible
Thank you
|
|
|
|
|
Anonymous wrote:
there is any other way to send mail by pure html
No there is not
Anonymous wrote:
may i have use any service like SMTP
Yes you must use SMTP and you would have to do that from the web server not the browser [in most cases] for security restrictions.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|