Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
detect titlebar
#1
with ppro i trigger with a left_hold my left_hold function.
how can i find out if win(mouse) is on a titlebar of any window ?

or minimize button,etc ?
pi
#2
Code:
Copy      Help
POINT p; GetCursorPos(&p)
[color=blue]int [/color]ht=SendMessage([color=blue]win[/color](p.x p.y) WM_NCHITTEST 0 (p.x&0xffff)|(p.y<<16))
[color=blue]out [/color]ht
[color=blue]sel [/color]ht
,[color=blue]case [/color]HTCAPTION [color=blue]out [/color]"caption"
,[color=blue]case [/color]HTMINBUTTON [color=blue]out [/color]"min button"
,[color=green];...
;HTx constants are defined somewhere in WinConstants function
[/color]
#3
very nice.
thanks.
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)