起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 154|回复: 7

【结帖】[请求]函数问题**

[复制链接]
发表于 2008-4-25 16:36:09 | 显示全部楼层 |阅读模式
Borland.Delphi.Windows.GetWindowText、
Borland.Delphi.Windows.GetClassName
我用上面两个函数在平台中怎么得不到caption和ClassName呢?
回复

使用道具 举报

发表于 2008-4-25 17:01:34 | 显示全部楼层
楼主,请问一下,你的原始需求是什么呢?能描述一下么?我们好看下有什么好的方法来解决。
(平台对指针操作不支持。)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-28 09:51:29 | 显示全部楼层
还是那个问题,就是想截获Form里面的鼠标消息,在Delphi的很多方法移植到平台里面都不行啊
回复 支持 反对

使用道具 举报

发表于 2008-4-28 10:08:38 | 显示全部楼层
嗯,这个问题好像不太好实现。
首先,平台不支持指针操作。
其次,平台里的很多东西都跟delphi是不一样的了,所以即使你delphi里实现了该钩子并引入到平台中,你未必就能钩到你要的东西。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-28 10:10:16 | 显示全部楼层
用这种方式怎么也不行啊?

unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm2 = class(TForm)
    Memo1: TMemo;
    Button1: TButton;
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure AppMsg(var Msg: TMsg; var Handled: Boolean);
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.AppMsg(var Msg: TMsg; var Handled: Boolean);
begin
  if (Msg.message = WM_LBUTTONUP)then
  showmessage('fa');
end;

procedure TForm2.FormShow(Sender: TObject);
begin
  Application.OnMessage := AppMsg;
end;

end.
回复 支持 反对

使用道具 举报

发表于 2008-4-28 10:38:18 | 显示全部楼层
楼主,看4楼。
回复 支持 反对

使用道具 举报

发表于 2008-4-30 08:41:48 | 显示全部楼层
还有问题么,楼主?
回复 支持 反对

使用道具 举报

发表于 2008-5-9 22:43:21 | 显示全部楼层
由于长期未反馈,结帖。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-7-12 07:35 , Processed in 0.042861 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表