如何修改标题及菜单栏?(100分)

  • 主题发起人 主题发起人 chemer
  • 开始时间 开始时间
C

chemer

Unregistered / Unconfirmed
GUEST, unregistred user!
我想在窗口的标题栏和菜单栏上添加图标,就像RealPlayer那样,行吗?
 
http://www.delphibbs.com/delphibbs/dispq.asp?lid=761605
 
我有一个例子 要不要
 
dingbaosheng,当然要啦。[:)]
 
要用自定义消息
 
unit Unit1;<br><br>interface<br><br>uses<br>&nbsp; Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,shellapi,<br>&nbsp; StdCtrls;<br><br>type<br>&nbsp; TForm1 = class(TForm)<br>&nbsp; &nbsp; Button1: TButton;<br>&nbsp; &nbsp; Button2: TButton;<br>&nbsp; &nbsp; procedure Button1Click(Sender: TObject);<br>&nbsp; &nbsp; procedure Button2Click(Sender: TObject);<br>&nbsp; private<br>&nbsp; &nbsp; { Private declarations }<br>&nbsp; public<br>&nbsp; &nbsp; { Public declarations }<br>&nbsp; end;<br><br>var<br>&nbsp; Form1: TForm1;<br><br>implementation<br><br>{$R *.DFM}<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br>&nbsp; a,b:longint;<br>begin<br>&nbsp; a:=GetSystemMenu(self.handle,false);<br>&nbsp; b:=GetMenuItemCount(a);<br>&nbsp; deleteMenu(a,b-1,MF_BYPOSITION);<br>&nbsp; b:=getmenuitemcount(a);<br>&nbsp; deletemenu(a,b-1,MF_BYPOSITION);<br>end;
 
我可以在菜单栏上添加图标<br>方法是选择指定菜单修改BITMAP属性即可
 
procedure DrawIt;<br>var<br>&nbsp; cavNew: TCanvas;<br>begin<br>&nbsp; cavNew := TCanvas.Create;<br>&nbsp; cavNew.Handle := GetWindowDC(Handle);<br>&nbsp; cavNew.Draw(...);<br>end;
 
多人接受答案了。
 
我想起交同样的问题,请各位打个大姐帮忙。把源代码发到我的邮箱里。谢谢!邮箱wawxh@eyou.com &nbsp;<br><br>
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
后退
顶部