Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IShellUIHelper & CDHTMLDialog

16 views
Skip to first unread message

Haroon

unread,
Apr 24, 2006, 1:58:02 PM4/24/06
to
Hi:

I have a MFC appl which is hosting a dhtml dialog. The application does not
submit a form, however I have enclosed the dialog in a form element. I want
to use AutoCompleteSaveForm method of IShellUIHelper. I cannot figure out
how to call it sucessfuly thru my cdhtml dialog class. The getExternal
returns a NULL, any help would be greatly appreciated. The DHTML form looks
like
<html>
<body>
<form autocomplete='on'>
<input autocomplete='on' type=text/>
</form>
</body>

Code fragment
CComPtr<IDispatch> spDispatch;
hr = GetExternal(&spDispatch);
// Seem to be stuck at this line?
if (spDispatch) {
CComPtr<IShellUIHelper> spShell;
hr = spDispatch->QueryInterface(IID_IShellUIHelper,(void **)&spShell);
if (spShell){
CComPtr<IHTMLDocument3> spDoc3;
hr = spDoc2->QueryInterface (IID_IHTMLDocument3,(void **)&spDoc3);
CComPtr<IHTMLElement> spElement;
hr = spDoc3->getElementById (CComBSTR("oForm"),&spElement);
if (spElement) {
CComVariant vForm(spElement);
hr = spShell->AutoCompleteSaveForm (&vForm);
}

0 new messages