是vcl把这个右键菜单的消息屏蔽了!
解决方案 »
- delphi 何为 IShellWindows?有什么用法?求祥解。
- 请问有什么软件可以制作64*64的.cur文件
- 高人们来看看,超级有难度的问题!
- 求stdcall的用法
- 如何历遍同窗体中的同类控件?
- 句柄(handle)到底怎么掌握呀!能否举几个具体的事例来说明一下,小弟非常感谢!
- 为什么我的speedbutton消息响应不了了?
- DbGrid中我想点那个列,显示的数据就按那个列排序,(后面是ClientDataSet)怎么办?
- 兄弟们啊,怎样改变标题栏的颜色(比如说由红色渐变到白色)?
- 有一个字符串,长度未知,要去掉字符串最后一个字符该怎么做????
- 请大家测试一下我的软件!
- 如何打包制作含有SQL server(个人版)数据库的应用软件的安装程序?急用!!!!
使用TPopupMenu控件,将RichEdit的PopupMenu属性指向它
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Grids, Outline, DirOutln, ComCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure MyDefineProcedure(var Msg: TMsg; var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.MyDefineProcedure(var Msg: TMsg; var Handled: Boolean);
begin
if msg.message=WM_RBUTTONDOWN then msg.message:=WM_NULL;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
application.OnMessage:=MyDefineProcedure;
end;end.
2:放一个TPopupMenu,Images设为ImageList1;
3:双击ActionList1,点击右键,选择"New Stantard Action...",添加如下Action:TEditCopy、TEditCut、TEditDelete、TEditPaste、TEditSelectAll、TEditUndo。
4:编辑你的PopupMenu1,添加六项,Action属性分别设为你刚添加的六个Action;
5:设置RichEdit.PopupMenu为你的PopupMenu1控件。
____ ____
\ p \ / g /
\ l \_/ n /
\ a o /
\ i s /
\ n /
\_/
IE右键菜单会弹出,但使用没有效果...
选了复制,但粘贴时发现没有东西...