我想自定意消息却不知怎样做呀急呀 WNDPROC重载怎样用呀请各位高手给具体介绍或者给一个简单的小例子在此感谢了呀 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 unit Unit4;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm4 = class(TForm) ListBox1: TListBox; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private { Private declarations } public { Public declarations } protected procedure Wndproc (var message:Tmessage);override; end;var Form4: TForm4;implementationuses shellapi;{$R *.dfm}procedure TForm4.Wndproc(var message: Tmessage);var Count, Index,hDrop:Integer; PFileName:PChar;begin if message.Msg = WM_DROPFILES then begin hDrop :=message.WParam; GetMem(PFileName,MAX_PATH); Count :=DragQueryFile(hDrop, MAXDWORD, PFileName, MAX_PATH-1); ListBox1.Items.Clear; for Index :=0 to Count-1 do begin DragQueryFile(hDrop, Index, PFileName, MAXBYTE); ListBox1.Items.Add(PFileName); end; FreeMem(PFileName); DragFinish(hdrop); end else begin inherited; end;end;procedure TForm4.FormCreate(Sender: TObject);begin DragAcceptFiles(Handle, true);end;procedure TForm4.FormDestroy(Sender: TObject);begin DragAcceptFiles(Handle, false);end;end. 有没有GDI+的离线文档?CHM或PDF,或其它的也行 请大家帮忙看看,是不是DELPHI帮助里的例子错误?? dbgrid输入框为cocombox 问了半天,没人理啊,是不是问题太弱了,郁闷! 请问各位大哥,现在申请哪个网站的免费邮箱好一点?多谢了! 如何解决闪烁问题,画图时重画时。 请问如何实现通过前台软件,对后台某个表中字段的管理? 请问显示这种错误提示指的是什么意思? 应急 另请问知道如何将int型转换成定长的字符型,若不够长用‘0’补位吗????、 [邀你共同测试]资料收集管理专家全功能测试版 请教关于消息处理的问题,100分送上
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm4 = class(TForm)
ListBox1: TListBox;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
protected
procedure Wndproc (var message:Tmessage);override;
end;var
Form4: TForm4;implementation
uses shellapi;{$R *.dfm}
procedure TForm4.Wndproc(var message: Tmessage);
var
Count, Index,hDrop:Integer;
PFileName:PChar;
begin
if message.Msg = WM_DROPFILES then
begin
hDrop :=message.WParam;
GetMem(PFileName,MAX_PATH);
Count :=DragQueryFile(hDrop, MAXDWORD, PFileName, MAX_PATH-1);
ListBox1.Items.Clear;
for Index :=0 to Count-1 do
begin
DragQueryFile(hDrop, Index, PFileName, MAXBYTE);
ListBox1.Items.Add(PFileName);
end;
FreeMem(PFileName);
DragFinish(hdrop);
end else
begin
inherited;
end;
end;
procedure TForm4.FormCreate(Sender: TObject);
begin
DragAcceptFiles(Handle, true);
end;procedure TForm4.FormDestroy(Sender: TObject);
begin
DragAcceptFiles(Handle, false);
end;end.