Create a new toolbar, which you can then sign themselves and clone the data from the other toolbar.
The background is painted by TrayNotifyWnd.
Log the messages to this window and see whether what the right thing is what you will still have to implement.
Before anyone tried the code above, then prefer to take this one, which the Toolbar is also released.
Bevor jemand den oberen Code ausprobiert, dann nehmt lieber diesen hier, welcher die Toolbar auch wieder freigibt.
Delphi-Quellcode:
type
TForm1 =
class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private-Deklarationen }
_window, _parent: HWND;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
wndMain, wndChild: HWND;
begin
wndMain := FindWindow('
Shell_TrayWnd','
');
if wndMain <> 0
then
begin
wndChild := FindWindowEx(wndMain, 0, '
TrayNotifyWnd',
nil);
wndChild := FindWindowEx(wndChild, 0, '
SysPager',
nil);
wndChild := FindWindowEx(wndChild, 0, '
ToolbarWindow32',
nil);
if wndChild <> 0
then
begin
ShowMessage('
Window Handle: ' + IntToStr(wndChild));
_window := wndchild;
_parent := windows.GetParent(_window);
windows.SetParent(wndchild, form1.handle);
//EnableBlurBehindWindow(form1.Handle);
end;
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
windows.SetParent(_window, _parent);
end;