konhon

忘掉過去,展望未來。找回自我,超越自我。
逃避不一定躲的过, 面对不一定最难过, 孤单不一定不快乐, 得到不一定能长久, 失去不一定不再拥有, 可能因为某个理由而伤心难过, 但我却能找个理由让自己快乐.

Google

BlogJava 首页 新随笔 联系 聚合 管理
  203 Posts :: 0 Stories :: 61 Comments :: 0 Trackbacks

uses CommCtrl;

procedure TForm1.ListView1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
var
  item: TListItem;
  lvhti: LV_HITTESTINFO;
begin
  item := ListView1.GetItemAt(X, Y);
  if (item <> nil) then
    Caption := 'Mouse at: ' + item.Caption
  else
  begin
    lvhti.pt.X := X;
    lvhti.pt.Y := Y;
    ListView_SubItemHitTest(ListView1.Handle, @lvhti);
    if Assigned(ListView1.Items[lvhti.iItem])
      and (ListView1.Items[lvhti.iItem].SubItems.Count >= lvhti.iSubItem) then
      Caption := 'Mouse at:' + ListView1.Items[lvhti.iItem].SubItems[lvhti.iSubItem - 1];
  end;
end;

posted on 2005-08-25 06:45 konhon 优华 阅读(1092) 评论(0)  编辑  收藏 所属分类: Delphi

只有注册用户登录后才能发表评论。


网站导航: