我想改掉开始菜单的开始两个字,我已经取得了他的窗口句柄handle,不知道该怎么做。我用过了setwindowtext(handle,'asdf')但是不行,开

  • 主题发起人 主题发起人 jilina
  • 开始时间 开始时间
J

jilina

Unregistered / Unconfirmed
GUEST, unregistred user!
我想改掉开始菜单的开始两个字,我已经取得了他的窗口句柄handle,不知道该怎么做。我用过了setwindowtext(handle,'asdf')但是不行,开始两个字还是在那呆着!我该怎么做!!(50分)<br />我想改掉开始菜单的开始两个字,我已经取得了他的窗口句柄handle,<br>不知道该怎么做。我用过了setwindowtext(handle,'asdf')<br>但是不行,开始两个字还是在那呆着!我该怎么做!!
 
有的地方介绍说用settext API可以实现,setwindowtext是不是这个API的一个呀!<br>“开始”是这个窗口的caption吗?
 
那是一张图片, 你怎么改?
 
是图片!<br>下面这个程序可以(出处不记得了):<br><br>unit UChangeStartBtn;<br><br>interface<br><br>uses<br>&nbsp; Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br>&nbsp; StdCtrls;<br><br>type<br>&nbsp; TForm1 = class(TForm)<br>&nbsp; &nbsp; Label1: TLabel;<br>&nbsp; &nbsp; procedure FormCreate(Sender: TObject);<br>&nbsp; &nbsp; procedure FormDestroy(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>&nbsp; StartButton: hWnd;<br>&nbsp; OldBitmap: THandle;<br>&nbsp; NewImage: TPicture; &nbsp; <br><br>implementation<br><br>{$R *.DFM}<br><br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br>&nbsp; NewImage := TPicture.create;<br>&nbsp; NewImage.LoadFromFile('C:/Windows/Circles.BMP');<br>&nbsp; StartButton := FindWindowEx(FindWindow('Shell_TrayWnd', nil), 0, 'Button', nil);<br>&nbsp; OldBitmap := SendMessage(StartButton, BM_SetImage, 0, NewImage.Bitmap.Handle);<br>end;<br><br>procedure TForm1.FormDestroy(Sender: TObject);<br>begin<br>&nbsp; SendMessage(StartButton,BM_SetImage,0,OldBitmap);<br>&nbsp; NewImage.Free;<br>end;<br><br>end.<br><br><br><br><br>
 
多谢了!
 

Similar threads

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