I built a Visual Studio 2008 VC++ project, dialog based using HTML.
In my HTML I have:

<form name="loadExcel">
    Choose the file which contains the information:<br />
    <input type="file" name="myFile" value="Search" id="myFileInput" /><br />
    <input type="button" class="Upload" name="loadExcel" title="Import" id="loadExcelButton" />

The user is supposed to browse to a valid Excel file which I will work using the excellent ExcelFormat library by Martin Fuchs to produce a XML output.
So, I try to capture the path to the file or at least something using the button loadExcel that will trigger a function:

	DHTML_EVENT_ONCLICK(_T("ButtonCancel"), OnButtonCancel)
	DHTML_EVENT_ONCLICK(_T("loadExcelButton"), OnLoadExcel)

And here is the code to my function so far:

HRESULT CGeneraliDMDlg::OnLoadExcel(IHTMLElement* pElement){
	BSTR bstrText = NULL;
	GetElement(_T("myFileInput"), &pElement);
		char *Text = _com_util::ConvertBSTRToString(bstrText);
	return S_OK;

For some reason I don't understand, the Message box is empty, does it mean I'm not capturing anything? can someone give me a little help with this?
To tell the truth, I found the code for the OnLoadExcel function doing some research, but it does not work.
If I do something like pElement->put_outerHTML(blah) , it works perfect, so i think somehow i'm loosing my information in the way.

In advance, thanks for any help you can give me :D

Well, I wonder if I can get at least one answer, as no one seem to be interested in my thread. Was the question too stupid? or too complicated?
I would like to have any kind of answer to help me solve my problem or just delete all my project and start from scratch.

Thanks again (to whoever wants to answer something)

This article has been dead for over six months. Start a new discussion instead.