Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Transparent Desktop Toolbar
#1
i just got an idea, would it be possible to have a transparent toolbar on desktop which only becomes active when mouse drag is in the toolbar area?
so that i for example drag a link from firefox over that area the qm toolbar and it would offer icons for possible drop.
when mouse leaves toolbar then it hides the icons.
pi
#2
Probably would need a toolbar hook function with a timer...

To detect OLE drag and drop also can be used accessibility trigger.
Function acc_drag_detect
Trigger $a 8 0 0 "CLIPBRDWNDCLASS"     Help - how to add the trigger to the macro
Code:
Copy      Help
function hwnd idObject idChild
OnScreenDisplay "Drag and drop detected" -1 0 0 "" 0 0 8
rep
,1
,int tid=GetWindowThreadProcessId(hwnd 0); if(!tid) break
,GUITHREADINFO g.cbSize=sizeof(g)
,if(!GetGUIThreadInfo(tid &g)) break
,if(g.hwndCapture!hwnd) break
#3
Gintaras Wrote:Probably would need a toolbar hook function with a timer...

To detect OLE drag and drop also can be used accessibility trigger.
Function acc_drag_detect
Trigger $a 8 0 0 "CLIPBRDWNDCLASS"     Help - how to add the trigger to the macro
Code:
Copy      Help
function hwnd idObject idChild
OnScreenDisplay "Drag and drop detected" -1 0 0 "" 0 0 8
rep
,1
,int tid=GetWindowThreadProcessId(hwnd 0); if(!tid) break
,GUITHREADINFO g.cbSize=sizeof(g)
,if(!GetGUIThreadInfo(tid &g)) break
,if(g.hwndCapture!hwnd) break

wow, this is a good start!!!
pi
#4
can i use captureend to get info about the target?

my steps so far with your example code.
can identify source window info from hwnd.

Function acc_drag_detect
Trigger $a 8 0 0 "CLIPBRDWNDCLASS"     Help - how to add the trigger to the macro
Code:
Copy      Help
function hwnd idObject idChild
str exe.getwinexe(hwnd)
;if exe = "qm"; end
str osdtext.format("Drag and drop detected from exe: %s" exe)
OnScreenDisplay osdtext -1 0 0 "" 0 0 8
rep
,1
,int tid=GetWindowThreadProcessId(hwnd 0); if(!tid) break
,GUITHREADINFO g.cbSize=sizeof(g)
,if(!GetGUIThreadInfo(tid &g)) break
,if(g.hwndCapture!hwnd) break
pi
#5
next level. in order to get info about the ole object, should i simply send copy and analyze clipboard?
like detecting if it is an url.
then i could show url related buttons on the toolbar.
pi
#6
Quote:in order to get info about the ole object, should i simply send copy and analyze clipboard?
Can try it. It maybe simpler, but not the correct way.
The better way is QmRegisterDropTarget. You probably already used dialogs or toolbars with it. Look for more examples in forum. Your window must be under mouse, because it must receive a "drag enter" notification; it may be a temporary small and almost transparent window.

Quote:can i use captureend to get info about the target?
It will give you the same hwnd as capturestart.


Forum Jump:


Users browsing this thread: 1 Guest(s)