[개발/VC++] WebBrowser HTML Element Events 핸들링
IDispEventSimpleImpl 의 SinkEvent 관련
[[ C++ - Header ]]
extern _ATL_FUNC_INFO OnClickEventInfo;
class CEventSink : public IDispEventSimpleImpl<1, CVCMapEventSink, &DIID__EventInterface>
{
BEGIN_SINK_MAP(CEventSink )
SINK_ENTRY_INFO(1,DIID__EventInterface, 1, OnClickEvent, &OnClickEventInfo)
END_SINK_MAP()
...
public:
void Start()
{
DispEventAdvise((IUnkown*) pClass);
}
void Stop();
{
DispEventUnadvise((IUnknown*) pClass);
}
void __stdcall OnClickEvent(int ID, bool selected);
private:
_COMClassPtr pClass;
CWnd* m_pTargetWnd;
}
[[ C++ - Cpp ]]
_ATL_FUNC_INFO OnClickEventInfo= {CC_STDCALL, VT_EMPTY, 2, {VT_INT,VT_BOOL}};
void CEventSink::OnSelectedTeacher(int ID, bool selected)
{
...
}
/// main
void main()
{
...
CEventSink sink = new CEventSink(this);
sink->Start();
...
/// release
sink->Stop();
delete sink;
...
}
'IT-개발,DB' 카테고리의 다른 글
[개발/인터넷] RIA(Rich Internet Apllication)이란? (0) | 2014.06.23 |
---|---|
[web/javascript] 입력양식에서 포커스 자동이동하기 (0) | 2014.06.20 |
[개발/VC++] CreateThread(), _beginthread(), _beginthreadex() 에 관하여 (0) | 2014.02.04 |
[html] 태그로 테이블 모서리를 둥글게 (0) | 2014.01.21 |
[개발/PHP] web php unicode 문자열 urldecode (0) | 2014.01.21 |
댓글