I need to process onclick event for A element in CDhtmlDialog that loads external HTML file with HTTP protocol (not HTML from resource). I use following code:
BEGIN_DHTML_EVENT_MAP(CAdDialog)
DHTML_EVENT_ONCLICK(_T("adlink"), OnAnchorClicked)
END_DHTML_EVENT_MAP()
My A element HTML follows:
<a href="http://www.google.com/" id="adlink">Click here!!!</a>
I expect that CDhtmlDialog will call OnAnchorClicked function when user clicks the link. However, nothing happens instead. It looks like DHTML_EVENT_ONCLICK doesn't work for CDhtmlDialog if it loads external URL instead of loading resource? Is there any way to catch onclick event for HTML loaded via HTTP in CDhtmlDialog?