L
LeonSu
Unregistered / Unconfirmed
GUEST, unregistred user!
源代码如下部份)
procedure TForm1.btn1Click(Sender: TObject);
var
Tencent_QQbar: hWnd;
AfxWnd42: HWND;
P: TPoint;
begin
Tencent_QQbar:=0;
GetCursorPos(P);
lbl1.Caption:=Format('%d',[Tencent_QQBar]);
Tencent_QQbar := WindowFromPoint(p);
if Tencent_QQbar<>0 then
AfxWnd42 := FindWindowEx(Tencent_QQbar, 0, 'AfxWnd42', '') //-找到好友列表的滚动条,以后滚动即可换聊天对象.
else
Exit;
PostMessage(Tencent_QQbar, WM_LBUTTONDBLCLK, 0,MakeLParam(P.X,P.Y));//这个消息肯定收到,但没结果
PostMessage(AfxWnd42, WM_VSCROLL, SB_LINEDOWN, 0);//这里都能让滚动栏滚动的
PostMessage(Tencent_QQbar, WM_RBUTTONUP, 0,MakeLParam(P.X,P.Y));//这条语句都能正常运行
procedure TForm1.btn1Click(Sender: TObject);
var
Tencent_QQbar: hWnd;
AfxWnd42: HWND;
P: TPoint;
begin
Tencent_QQbar:=0;
GetCursorPos(P);
lbl1.Caption:=Format('%d',[Tencent_QQBar]);
Tencent_QQbar := WindowFromPoint(p);
if Tencent_QQbar<>0 then
AfxWnd42 := FindWindowEx(Tencent_QQbar, 0, 'AfxWnd42', '') //-找到好友列表的滚动条,以后滚动即可换聊天对象.
else
Exit;
PostMessage(Tencent_QQbar, WM_LBUTTONDBLCLK, 0,MakeLParam(P.X,P.Y));//这个消息肯定收到,但没结果
PostMessage(AfxWnd42, WM_VSCROLL, SB_LINEDOWN, 0);//这里都能让滚动栏滚动的
PostMessage(Tencent_QQbar, WM_RBUTTONUP, 0,MakeLParam(P.X,P.Y));//这条语句都能正常运行