Hi,
    I am trying to listen to resize and keypress dom events, I have written
C++ code for it. I am able to listen to the mousemove (and mouse related
events), however I am not been able to listen to keypress or resize events.

Below is a snippet of code.

NS_IMETHODIMP NoteBar::HandleEvent(nsIDOMEvent *event)

{

nsCOMPtr<nsIDOMMouseEvent> mouseEvent ( do_QueryInterface(event) );

nsAutoString type;

.....................................

....................................

return NS_OK;

}


NS_IMETHODIMP NoteBar::SomeFunction()

{

........................

nsCOMPtr<nsIDOMEventTarget> noteTarget(do_QueryInterface(mNoteElementP));



noteTarget->AddEventListener(NS_LITERAL_STRING("mouseover"), this, PR_TRUE);

noteTarget->AddEventListener(NS_LITERAL_STRING("mouseout"), this, PR_TRUE);

noteTarget->AddEventListener(NS_LITERAL_STRING("resize"), this, PR_TRUE);

noteTarget->AddEventListener(NS_LITERAL_STRING("resize"), this, PR_TRUE);

}


_______________________________________________
mozilla-editor mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-editor

Reply via email to