htmlview.dll question

  • Thread starter Thread starter Agustin
  • Start date Start date
A

Agustin

Thank you very much Alex. It's just what I was looking for.

Alex Yakhnin [MVP] escribió:
 
Hi, I'm developing an aplication with C# and I'm trying to use the
htmlview.dll (
http://msdn.microsoft.com/library/d...-us/mobilesdk5/html/mob5conHTMLControlAPI.asp). I
want to implement some kind of web browser for PDA. I saw the notifications
that the control sends in response of the user interaction like NM_HOTSPOT.
I was trying to do something like not navigate to anywhere when de user
click a link, but do something else, and I thought that the NM_HOTSPOT
notification was the right one to take care of, and I put some code to sent
the DTML_STOP message to the control. But it sitll navigate to the url in
the href attribute on the link. I was wondering if it is possible to
intercept and avoid the navigation procces when the user clicks a link.
Does any one have a clue?
Thanks
Agustin
 
From MSDN docs:
"If the application handles this message it should return a non-zero result. "
 
I try this solution, but it doesn't work. I don't know why. I return a
non-zero value but the control still handle the message. ¿Any clue?
My code is below. Thanks

protected virtual int OnNotifyMessage(ref Message m)
{
HtmlViewMessage hvm;
NmHdr hdr = NmHdr.GetStruct(m.LParam);
switch (hdr.code)
{
case NM_HOTSPOT:
hvm = HtmlViewMessage.GetStruct(m.LParam);
AnchorClickEventArgs args = new AnchorClickEventArgs();
args.Url = hvm.target;
AnchorClickEv(this, args); }*/
//Don't let the default control handles the event
return 4;
default:
break;
}
return 0; //default: let control handle it
}




Alex Yakhnin [MVP] escribió:
 
Never mind...it seems like the emulator go crazy... I re-install
everything and start to work find.



Agustin escribió:
 
Back
Top