|
发表于 2019-3-3 10:02:15
|
显示全部楼层
广西壮族自治区崇左市
窗口程序集名 | 保 留 | 保 留 | 备 注 | 窗口程序集_窗口1 | | | |
|
_图片框1_鼠标左键被按下 | 逻辑型 | | |
横向位置 | 整数型 | | | | 纵向位置 | 整数型 | | | | 功能键状态 | 整数型 | | | | hWnd = 图片框1. 取窗口句柄 ()SetPropA (hWnd, “proc”, SetWindowLongA (hWnd, #GWL_WNDPROC, 到整数 (&WndProc )) )|
WndProc | 整数型 | | |
hWnd | 整数型 | | | | uMsg | 整数型 | | | | wParam | 整数型 | | | | lParam | 整数型 | | | |
变量名 | 类 型 | 静态 | 数组 | 备 注 | rc | RECT | | | rcTmp | RECT | | | x | 整数型 | | | y | 整数型 | | | nTmp | 整数型 | | | 判断 (uMsg = #WM_NCHITTEST ) nTmp = 5 GetWindowRect (hWnd, rc )x = 位与 (lParam, 65535 ) y = 右移 (lParam, 16 ) rcTmp = rc rcTmp.Left = rc.Right - nTmp rcTmp.Top = rc.Bottom - nTmp 如果真 (PtInRect (rcTmp, x, y )) 返回 ( #HTBOTTOMRIGHT ) rcTmp = rc rcTmp.Top = rc.Bottom - nTmp rcTmp.Right = rc.Left + nTmp 如果真 (PtInRect (rcTmp, x, y )) 返回 ( #HTBOTTOMLEFT ) rcTmp = rc rcTmp.Right = rc.Left + nTmp rcTmp.Bottom = rc.Top + nTmp 如果真 (PtInRect (rcTmp, x, y )) 返回 ( #HTTOPLEFT ) rcTmp = rc rcTmp.Left = rc.Right - nTmp rcTmp.Bottom = rc.Top + nTmp 如果真 (PtInRect (rcTmp, x, y )) 返回 ( #HTTOPRIGHT ) rcTmp = rc rcTmp.Right = rc.Left + nTmp rcTmp.Top = rc.Top + nTmp rcTmp.Bottom = rc.Bottom - nTmp 如果真 (PtInRect (rcTmp, x, y )) 返回 ( #HTLEFT ) rcTmp = rc rcTmp.Bottom = rc.Top + nTmp 如果真 (PtInRect (rcTmp, x, y )) 返回 ( #HTTOP ) rcTmp = rc rcTmp.Left = rc.Right - nTmp 如果真 (PtInRect (rcTmp, x, y )) 返回 ( #HTRIGHT ) rcTmp = rc rcTmp.Top = rc.Bottom - nTmp 如果真 (PtInRect (rcTmp, x, y )) 返回 ( #HTBOTTOM ) . rcTmp = rc rcTmp.Bottom = rc.Top + 30 如果真 (PtInRect (rcTmp, x, y )) 返回 ( #HTCAPTION ) 判断 (真) 返回 ( #HTCLIENT ) 返回 (CallWindowProcA (GetPropA (hWnd, “proc”), hWnd, uMsg, wParam, lParam )) 返回 (CallWindowProcA (GetPropA (hWnd, “proc”), hWnd, uMsg, wParam, lParam ))
只能用API,不然你自己封装成一个子程序...然后认为没有调用API......
例子 https://bbs.125.la/forum.php?mod=viewthread&tid=14205525
|
|