Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QM Editor: piToolbar
#1
preview:
[Image: pitoolbar.jpg]

icons in the script are custom ...

toolbar: piToolBar
Code:
Copy      Help
;/hook _piT /col 0xb0e0b0 /siz 240 28 /isiz 12 12
dis|enable :__piT("disable_qm_item") * icons\endis_status.ico
-
new folder :__piT("new folder") * piToolBar1.ico
new function :__piT("new function") * function.ico
new macro :__piT("new macro")
-
Find window or control :mac "TO_FindWindow" * target.ico
Control-specific actions :mac "TO_Controls" * controls.ico
;Get text :mac "pi_toolbar_GetText" * text.ico
;Hide window or control :mac "pi_toolbar_hideWindow"
;Move window or control :mac "pi_toolbar_moveWindow"

Find accessible object :EA_Main _hwndqm * findacc.ico
Accessible object actions :mac "TO_Accessible" * lightning.ico
;Refresh :men 32983 _hwndqm * $Program Files$\PowerPro\icons\all1.icl *127
;


toolbar hook function: _piT
Code:
Copy      Help
function hWnd message wParam lParam

def TB_HITTEST (WM_USER + 69)

int+ g_tb_move_htb g_tb_move_hfore
POINT+ g_tb_move_pos
POINT p

sel message
,case WM_CREATE
,,Transparent hWnd 250 0xb0e0b0

,case WM_SETCURSOR
,,if(lParam=WM_LBUTTONDOWN<<16|HTCLIENT)
,,,if(wParam=hWnd)
,,,else if(GetDlgCtrlID(wParam)=9999)
,,,,GetCursorPos &p; ScreenToClient wParam &p
,,,,if(SendMessage(wParam TB_HITTEST 0 &p)>=0) ret ;;button
,,,else ret
,,,
,,,GetCursorPos &g_tb_move_pos
,,,g_tb_move_htb=hWnd
,,,g_tb_move_hfore=win
,,,act hWnd ;;for SetCapture
,,,SetCapture hWnd
,,
,,case [WM_LBUTTONUP,WM_CANCELMODE]
,,g_tb_move_htb=0
,,SetCapture 0
,,act g_tb_move_hfore; err
,,
,,case WM_MOUSEMOVE
,,if(g_tb_move_htb=hWnd)
,,,RECT r; GetWindowRect hWnd &r
,,,GetCursorPos &p
,,,mov r.left+p.x-g_tb_move_pos.x r.top+p.y-g_tb_move_pos.y hWnd
,,,g_tb_move_pos=p
pi
#2
function __piT
Code:
Copy      Help
;/
function $what

sel what
,case "convert to function"
,,out huhu
,case "disable_qm_item"
,,dis _s.getmacro("" 1)
,case "new function"    
,,men 32978 "Quick Macros"
,case "new folder"
,,men 32999 "Quick Macros"
,case "new macro"
,,men 32995 _hwndqm
,,
,
,,;out _hwndqm
pi


Forum Jump:


Users browsing this thread: 2 Guest(s)