12-14-2007, 04:08 AM
preview:
icons in the script are custom ...
toolbar: piToolBar
toolbar hook function: _piT
icons in the script are custom ...
toolbar: piToolBar
;/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
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