Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dialog in exe format, do something when mouse position...
#2
WM_MOUSEMOVE - within dialog client area, not including controls.

Use timer or hook.

Function hotspot_example
Code:
Copy      Help
\Dialog_Editor

str dd=
;BEGIN DIALOG
;0 "" 0x80000840 0x90 0 0 385 11 "DlgMenu"
;3 Button 0x54032000 0x0 0 0 48 11 "Button1"
;4 Button 0x54032000 0x0 48 0 48 11 "Button2"
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "*" "" "" ""

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


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,RECT- t_r; SetRect &t_r 300 0 900 10
,int- t_inRect
,SetTimer hDlg 1 50 0
,
,case WM_TIMER
,sel wParam
,,case 1
,,POINT p; xm p
,,int inRect=PtInRect(&t_r p.x p.y)
,,if(inRect=t_inRect) ret
,,t_inRect=inRect
,,if(inRect) out "run notepad"
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)