does anyone know how to properly implement the WM_MOUSEHOVER code? all i need is for a message box to appear when my mouse hovers over a part of a window. for testing purposes i just need a working code sample. i been tring to figure it out for hours and its driving me nuts. thank you smurf This message was edited by smurf, on 5/21/2001 7:38:41 AM
You must call TrackMouseEvent first. After that, your window proc will receive WM_MOUSEHOVER message and you can proceed to do what you want. The catch is that: You got only one WM_MOUSEHOVER message per each call to TrackMouseEvent. So if you want to continue receiving WM_MOUSEHOVER messages, you must call TrackMouseEvent in your WM_MOUSEHOVER handler. BTW, TrackMouseEvent (and WM_MOUSEHOVER) only works on win98 or later: it won't work on win95
*** PLEASE SOMEONE HELP ME WITH THIS *** thanks for your reply iczelion. although your solution seems to be simple enough im still having problems. here is some of my code: im not sure exactly where im suppose to invoke the trackmouse event. ive tried all over in different places of my code.
and in my window proc i check for the message:
invoke SendMessage,hListView,LVM_GETHEADER,0,0 mov hHeader,eax mov TrackM.cbSize,SIZEOF TrackM mov TrackM.dwFlags,TME_HOVER mov eax,hHeader mov TrackM.hwndTrack,eax mov TrackM.dwHoverTime,HOVER_DEFAULT invoke TrackMouseEvent,ADDR TrackM
thank you smurf This message was edited by smurf, on 5/21/2001 12:23:18 PM This message was edited by smurf, on 5/21/2001 7:31:44 PM
.ELSEIF uMsg == WM_MOUSEHOVER ;<--- check for the event invoke TrackMouseEvent, ADDR TrackM ;<--- invoke again to track invoke MessageBox,0,0,0,0 ;<--- popup a message box when hovering