Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
On hover over dialog WM_... (mouse on/over dialog)
Is there a WM_... for when the mouse hovers over the dialog?
I thought there was a window message for it, but I can not find it anymore.
Don't know, I don't use it, I use timer. You can try function OutWinMsg or a program like Spy++.
Ok no problem.
I't would be used to "roll up" (vertically) minimize a dialog when the user moves mouse outside dialog.
I think I can do it with "DpiGetWindowRect" and "PtInRect"
I think I found the correct window message, at least it works:

Function Dialog6
Select All      Help
str dd=
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Static 0x54000000 0x0 1 45 222 26 "window message ''WM_NCMOUSELEAVE'' detects mousepointer:[]- moves from outside dialog into dialog[]- moves from inside dialog to outside dialog"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;DIALOG EDITOR: "" 0x2040601 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret

#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_NCMOUSELEAVE        
,,POINT p; xm p
,,RECT r
,,DpiGetWindowRect hDlg &r
,,int inRect=PtInRect(&r p.x p.y)
,,if(!inRect) ;; if inRect '1' mouse pointer is in dlg , if '0'then not in dlg
,,,out "EXECUTE ACTION 'mouse pointer out of dialog' HERE....."
,case WM_COMMAND goto messages2
sel wParam
,case IDOK
ret 1

Forum Jump:

Users browsing this thread: 1 Guest(s)