Click here to Skip to main content
15,916,951 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: about hook Pin
yingkou12-Aug-04 22:19
yingkou12-Aug-04 22:19 
GeneralRe: about hook Pin
Ryan Binns12-Aug-04 22:56
Ryan Binns12-Aug-04 22:56 
GeneralRe: about hook Pin
yingkou13-Aug-04 0:09
yingkou13-Aug-04 0:09 
GeneralRe: about hook Pin
Ryan Binns13-Aug-04 0:45
Ryan Binns13-Aug-04 0:45 
GeneralRe: about hook Pin
yingkou13-Aug-04 1:18
yingkou13-Aug-04 1:18 
GeneralMenu item changed event Pin
gokings12-Aug-04 19:14
gokings12-Aug-04 19:14 
GeneralRe: Menu item changed event Pin
gokings13-Aug-04 2:52
gokings13-Aug-04 2:52 
GeneralCHtmlView events Pin
alex.barylski12-Aug-04 19:03
alex.barylski12-Aug-04 19:03 
I struggled whether to post this question here in in the COM forum, but I ultimately decided the answer is more of a generic C++ question rather than C++ so I am posting it here Smile | :)

MFC6 has the CHtmlView class and like most classes in MFC using visual studio you can quickly add an handler for the events fired by the IWebBrowser2 actually according to MSDN (AFAIK)
it's the WebBrowser...cuz IWebBrowser2 doesn't seem to have events Confused | :confused:

BEGIN_EVENTSINK_MAP(CHtmlView, CFormView)
	ON_EVENT(CHtmlView, AFX_IDW_PANE_FIRST, 104 /* DownloadComplete */, OnDownloadComplete, VTS_BSTR)
END_EVENTSINK_MAP()


Then in your derived CHtmlView class you override a virtual function OnDownloadComplete and voila you now have the ability to tell when a document has been fully loaded.

How does MFC accomplish this task of event sinking, etc all with a couple of macros? I looked at the macros and I couldn't make anything of them WTF | :WTF:

Basically I want to use this same technique, but on a different interface...so I can avoid all the mumbo jumbo that goes along with capturing events sent from IHTMLDocument2, etc...

Anyone care to shed some light on how this is accomplished?

Thanx in advance Smile | :)

Cheers

How do I print my voice mail?
QuestionHow To create new XML file using msxml.dll? Pin
Rassul Yunussov12-Aug-04 18:41
Rassul Yunussov12-Aug-04 18:41 
AnswerRe: How To create new XML file using msxml.dll? Pin
*Dreamz12-Aug-04 20:17
*Dreamz12-Aug-04 20:17 
GeneralRe: How To create new XML file using msxml.dll? Pin
Rassul Yunussov12-Aug-04 21:13
Rassul Yunussov12-Aug-04 21:13 
GeneralRe: How To create new XML file using msxml.dll? Pin
*Dreamz12-Aug-04 23:12
*Dreamz12-Aug-04 23:12 
QuestionHow can I put a scrollbar's tap on any locatation I want? Pin
dashi2512-Aug-04 14:29
dashi2512-Aug-04 14:29 
GeneralProblem With My Child Window Title Bar Pin
Anonymous12-Aug-04 13:51
Anonymous12-Aug-04 13:51 
GeneralMS Access Question Pin
Anonymous12-Aug-04 13:03
Anonymous12-Aug-04 13:03 
GeneralRe: MS Access Question Pin
Member 129553312-Aug-04 19:34
Member 129553312-Aug-04 19:34 
GeneralDll Injection Problem - An Unusual Case Pin
Dr Memory12-Aug-04 11:33
Dr Memory12-Aug-04 11:33 
GeneralHDC to BitBlt (Visual C) Pin
marqua12-Aug-04 11:15
marqua12-Aug-04 11:15 
GeneralRe: HDC to BitBlt (Visual C) Pin
Antony M Kancidrowski12-Aug-04 13:04
Antony M Kancidrowski12-Aug-04 13:04 
GeneralRe: HDC to BitBlt (Visual C) Pin
mahade112-Aug-04 20:06
mahade112-Aug-04 20:06 
GeneralRe: HDC to BitBlt (Visual C) Pin
Ryan Binns12-Aug-04 20:52
Ryan Binns12-Aug-04 20:52 
GeneralArray of Variables Pin
Grahamfff12-Aug-04 11:09
Grahamfff12-Aug-04 11:09 
GeneralRe: Array of Variables Pin
tlerner12-Aug-04 11:14
tlerner12-Aug-04 11:14 
GeneralRe: Array of Variables Pin
mahade112-Aug-04 20:00
mahade112-Aug-04 20:00 
GeneralRe: Array of Variables Pin
Ryan Binns12-Aug-04 20:56
Ryan Binns12-Aug-04 20:56 

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.