.net - Impossible to get mouse input from a window in my own process -
i've been trying add video support image viewer application made in .net 4. after long research , many tests i've decided libvlc, free , supports large number of file formats (more windows media player, instance). there's wrapper library .net called meta.vlc seems work alright. simplicity, keep within 32 bit realm. problem comes when want process mouse events on video frame, drawn 1 of controls (i give library hwnd , apparently uses direct3d rendering).
the library doesn't expose mouse events, said "hey! no problem! know enough win32 api sort out". first, i've thought intercept mouse messages form overriding wndproc. nope. thought implement imessagefilter.prefiltermessage. nope again. wm_lmousedown , other related mouse events do not reach form. somehow they're "eaten up" child window. i've used spy++ , established video window indeed within process , descendant of form:
my control hwnd contains caption: "vlc (direct3d output)", class: "vlc video main 087cca50" contains caption: "", class: "vlc video output 087cca50" receives mouse input.
with spy++ can see mouse events indeed being generated , sent video output window no problem. however, cannot see them form. then! thought subclass either child or grandchild window using setwindowslong(gwl_wndproc), although succeeded in subclassing windows, mouse messages still hidden me!
a local windows hook wh_mouse (setwindowshookex) didn't work either. can see thread's mouse events not video window's. think global hook (wh_mouse_ll) require administrator access rights , i'd keep app low profile.
as final note, wm_parentnotify messages, wm_lmousedown; i'd full mouse support, wm_lmouseup, wm_rmousedown, wm_mousewheel, wm_mousemove, etc. don't receive. also, don't want use mouse capture (setcapture() function): mouse should remain free come , go between windows.
i'm astonished there's no way obtain mouse input video frame. think must missing obvious can't find it.
so, question is: using .net or win32 api calls, how mouse input window refuses cooperate, given window runs within own process , have handle. or -if can't done- why can't i?
perhaps can try adding transparent window on vlc window , getting mouse input window.
Comments
Post a Comment