Lazarus中文社区

 找回密码
 立即注册(注册审核可向QQ群索取)

QQ登录

只需一步,快速开始

Lazarus IDE and 组件 下载地址版权申明
查看: 1940|回复: 0

lazarus怎么有些windows消息没法处理呢???

[复制链接]

该用户从未签到

发表于 2012-11-1 14:37:52 | 显示全部楼层 |阅读模式
message WM_DEVICECHANGE  (u盘插拔) 在delphi下能处理
但在lazarus下怎么捕获不到这个消息事件呢
代码如下:
声明部分:  procedure WMDeviceChange( var Msg1:Tmessage);message WM_DEVICECHANGE;

实现部分:

procedure TForm1.WMDeviceChange(var Msg1:Tmessage);
  var
    i:integer;
    str:string;
  begin
   // inherited;
    showmessage('ccc');
    case Msg1.WParam of
    32768:      // U 盘插上事件
         begin
              showmessage('U 盘插入');
         end;
    32772:  //'U盘拔出';
        begin
             showmessage('U盘拔出');
        end;
    end;  // end of case
end;      
以上代码在delphi下起效,在lazarus下不起效,怎么回事?难道是lazarus屏蔽了一下windows消息事件                                 
回复

使用道具 举报

*滑块验证:

本版积分规则

QQ|手机版|小黑屋|Lazarus中国|Lazarus中文社区 ( 鄂ICP备16006501号-1 )

GMT+8, 2025-5-2 23:01 , Processed in 0.096394 second(s), 9 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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