Click here to Skip to main content
15,897,187 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
Generalcan't save new ATL ActiveX control on VB6 form page Pin
Amos.A27-Jul-05 3:54
Amos.A27-Jul-05 3:54 
GeneralWTL Multi Viewports OpenGL Pin
Aggressor25-Jul-05 23:10
Aggressor25-Jul-05 23:10 
Generalstring in switch case Pin
itkid25-Jul-05 22:56
itkid25-Jul-05 22:56 
GeneralRe: string in switch case Pin
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX26-Jul-05 0:50
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX26-Jul-05 0:50 
GeneralRe: string in switch case Pin
toxcct1-Aug-05 1:43
toxcct1-Aug-05 1:43 
QuestionHow to add MFC support to an ATL project in Visual C++ Pin
24-Jul-05 17:31
suss24-Jul-05 17:31 
AnswerRe: How to add MFC support to an ATL project in Visual C++ Pin
Member 212103824-Jul-05 18:21
Member 212103824-Jul-05 18:21 
AnswerRe: How to add MFC support to an ATL project in Visual C++ Pin
Stuart Dootson25-Jul-05 21:53
professionalStuart Dootson25-Jul-05 21:53 
Just to point you in what may be a better direction....you can sink DHTML events in ATL - you don't have to use MFC...

Here's an fragment of an ATL class implementing event sinks....it actually instantiates the IE control and then handles events in the methods OnMouseOut and OnMouseOver.

class CBrowserView : public CWindowImpl<CBrowserView, CAxWindow>,
                     public IDispEventImpl<1, CBrowserView, &DIID_HTMLElementEvents2, &LIBID_MSHTML, 4, 0>
{
public:
   typedef IDispEventImpl<1, CBrowserView, &DIID_HTMLElementEvents2, &LIBID_MSHTML, 4, 0> HTMLElementEventsSink;
   
   BEGIN_SINK_MAP(CBrowserView)
      SINK_ENTRY_EX(1, DIID_HTMLElementEvents2, DISPID_HTMLELEMENTEVENTS_ONMOUSEOVER, OnMouseOver)
      SINK_ENTRY_EX(1, DIID_HTMLElementEvents2, DISPID_HTMLELEMENTEVENTS_ONMOUSEOUT, OnMouseOut)
   END_SINK_MAP()

   void __stdcall OnMouseOver(IHTMLEventObj* pEvent);
   void __stdcall OnMouseOut(IHTMLEventObj* pEvent);
};


You need to call HTMLElementEventsSink::DispEventAdvise to register your event sink and HTMLElementEventsSink::DispEventUnadvise to unregister your event sink. You pass these functions a parameter, which is the IUnknown pointer of the object whose events you want to handle.

Anyway - hope that helps...

Stuart Dootson

'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
GeneralRe: How to add MFC support to an ATL project in Visual C++ Pin
Member 212103825-Jul-05 22:45
Member 212103825-Jul-05 22:45 
Questionhow do you insert socket in WTL? Pin
andy-wang22-Jul-05 16:26
andy-wang22-Jul-05 16:26 
Generalstd::string Pin
LCI21-Jul-05 5:48
LCI21-Jul-05 5:48 
GeneralRe: std::string Pin
Christian Graus21-Jul-05 18:56
protectorChristian Graus21-Jul-05 18:56 
GeneralRe: std::string Pin
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX21-Jul-05 23:46
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX21-Jul-05 23:46 
GeneralRe: std::string Pin
Christian Graus22-Jul-05 11:52
protectorChristian Graus22-Jul-05 11:52 
GeneralRegular Expressions Pin
Kevin McFarlane23-Jul-05 1:17
Kevin McFarlane23-Jul-05 1:17 
GeneralRe: Regular Expressions Pin
Christian Graus23-Jul-05 2:46
protectorChristian Graus23-Jul-05 2:46 
GeneralRe: Regular Expressions Pin
Kevin McFarlane23-Jul-05 3:43
Kevin McFarlane23-Jul-05 3:43 
GeneralRe: Regular Expressions Pin
Christian Graus23-Jul-05 10:58
protectorChristian Graus23-Jul-05 10:58 
GeneralRe: std::string - HELP Pin
LCI25-Jul-05 4:35
LCI25-Jul-05 4:35 
GeneralRe: std::string - HELP Pin
Roland Pibinger25-Jul-05 13:08
Roland Pibinger25-Jul-05 13:08 
GeneralRe: std::string - HELP Pin
Rob Caldecott26-Jul-05 21:08
Rob Caldecott26-Jul-05 21:08 
GeneralRe: std::string - HELP Pin
Kevin McFarlane30-Jul-05 23:38
Kevin McFarlane30-Jul-05 23:38 
GeneralRe: std::string - HELP Pin
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX31-Jul-05 23:46
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX31-Jul-05 23:46 
GeneralRe: std::string - HELP Pin
Kevin McFarlane1-Aug-05 7:21
Kevin McFarlane1-Aug-05 7:21 
GeneralRe: std::string - HELP Pin
Nemanja Trifunovic1-Aug-05 8:12
Nemanja Trifunovic1-Aug-05 8:12 

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.