Click here to Skip to main content
15,919,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to call interrupt function Pin
FlyingDancer19-Nov-03 0:32
FlyingDancer19-Nov-03 0:32 
GeneralRe: How to call interrupt function Pin
Mike Dimmick19-Nov-03 1:44
Mike Dimmick19-Nov-03 1:44 
GeneralRe: How to call interrupt function Pin
Peak19-Nov-03 2:47
Peak19-Nov-03 2:47 
GeneralRe: How to call interrupt function Pin
FlyingDancer19-Nov-03 3:09
FlyingDancer19-Nov-03 3:09 
GeneralDirectshow error w/ SetNotifyWindow Pin
georgiek5018-Nov-03 18:15
georgiek5018-Nov-03 18:15 
GeneralRe: Directshow error w/ SetNotifyWindow Pin
Ivor S. Sargoytchev18-Nov-03 19:28
Ivor S. Sargoytchev18-Nov-03 19:28 
GeneralRe: Directshow error w/ SetNotifyWindow Pin
georgiek5018-Nov-03 19:57
georgiek5018-Nov-03 19:57 
GeneralATL & DHTML Pin
Leesen18-Nov-03 17:40
Leesen18-Nov-03 17:40 
I write an ATL control to implement the onunload event of the html.

I set the onunload handle through IHTMLBodyElement. But it did not work.

Source code as follow:

//definition of IDHTMLTest2 in IDL
interface IDHTMLTest2 : IDispatch
{
[id(1), helpstring("method ShowMsg")] HRESULT ShowMsg();
};


//selection of the source code
CComPtrspIE;
m_spClientSite->GetContainer(&spIE);
CComQIPtrspDoc(spIE);
if (spDoc){
CComPtr spElement;
spDoc->get_body(&spElement);
CComQIPtr spBody(spElement);
IDispatch* pShowMsg;
QueryInterface(IID_IDHTMLTest2,(void**)&pShowMsg);
VARIANT v;
v.vt=VT_DISPATCH;
v.pdispVal=pShowMsg;

//this event can't be invoke ,when close the ie-window
spBody->put_onunload(v);

//this invoke works well
((IDHTMLTest2*)pShowMsg)->ShowMsg();


//code below can works well
// v.vt=VT_BSTR;
// v.bstrVal = L"#DA70D6";
// spBody->put_bgColor(v);

}



Thank you for your advanced help.

Regards.

GeneralRe: ATL & DHTML Pin
Peter Molnar19-Nov-03 15:27
Peter Molnar19-Nov-03 15:27 
GeneralRe: ATL & DHTML Pin
Leesen19-Nov-03 19:13
Leesen19-Nov-03 19:13 
GeneralRe: ATL & DHTML Pin
Peter Molnar20-Nov-03 2:33
Peter Molnar20-Nov-03 2:33 
GeneralRe: ATL & DHTML Pin
Leesen20-Nov-03 5:13
Leesen20-Nov-03 5:13 
GeneralRe: ATL & DHTML Pin
Peter Molnar20-Nov-03 5:34
Peter Molnar20-Nov-03 5:34 
Generalargv argc and buffer over-run HACK Pin
BaldwinMartin18-Nov-03 17:12
BaldwinMartin18-Nov-03 17:12 
GeneralRe: argv argc and buffer over-run HACK Pin
Peak18-Nov-03 20:20
Peak18-Nov-03 20:20 
GeneralRe: argv argc and buffer over-run HACK Pin
BaldwinMartin18-Nov-03 22:17
BaldwinMartin18-Nov-03 22:17 
GeneralRe: argv argc and buffer over-run HACK Pin
David Crow19-Nov-03 4:21
David Crow19-Nov-03 4:21 
QuestionHow to use GDI+ in MFC framework Pin
Member 65339918-Nov-03 16:43
Member 65339918-Nov-03 16:43 
AnswerRe: How to use GDI+ in MFC framework Pin
PJ Arends18-Nov-03 19:04
professionalPJ Arends18-Nov-03 19:04 
GeneralDetecting Virtual Adapters Pin
dafunkt18-Nov-03 16:22
dafunkt18-Nov-03 16:22 
Generaldetecting minimized view in MFC Pin
tgintz18-Nov-03 16:15
tgintz18-Nov-03 16:15 
GeneralRe: detecting minimized view in MFC Pin
PJ Arends18-Nov-03 19:08
professionalPJ Arends18-Nov-03 19:08 
GeneralRe: detecting minimized view in MFC Pin
tgintz18-Nov-03 19:23
tgintz18-Nov-03 19:23 
GeneralRe: detecting minimized view in MFC Pin
tgintz18-Nov-03 23:15
tgintz18-Nov-03 23:15 
QuestionNewB Memory Leak ? Pin
LOSTTWARE.com18-Nov-03 15:22
LOSTTWARE.com18-Nov-03 15:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.