Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
On hover over dialog WM_... (mouse on/over dialog)
#1
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.
#2
Don't know, I don't use it, I use timer. You can try function OutWinMsg or a program like Spy++.
#3
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"
#4
I think I found the correct window message, at least it works:

Function Dialog6
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;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"
;END DIALOG
;DIALOG EDITOR: "" 0x2040601 "*" "" "" ""

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


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,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_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Forum Jump:


Users browsing this thread: 1 Guest(s)