AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi Extract Tray And set its new Parent...
Thema durchsuchen
Ansicht
Themen-Optionen

Extract Tray And set its new Parent...

Ein Thema von Razor · begonnen am 5. Jul 2009 · letzter Beitrag vom 6. Jul 2009
 
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.401 Beiträge
 
Delphi 12 Athens
 
#6

Re: Extract Tray And set its new Parent...

  Alt 5. Jul 2009, 21:18
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;
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:25 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz