Registriert seit: 16. Mai 2005
Ort: Luzern
154 Beiträge
Delphi 10 Seattle Enterprise
|
Re: Move taskbar
30. Jan 2009, 21:14
I'm not sure if your code snippet really finds the taskbar...
Take a look at this code (part of amaTaBaSo, OpenSource, use DelphiPraxis Search to locate the whole Sourcecode):
Delphi-Quellcode:
function GetToolbarWindowHandle:HWND;
var
hDesktop : HWND;
hTray : HWND;
hReBar : HWND;
hTask : HWND;
hToolbar : HWND;
begin
hDesktop := GetDesktopWindow;
hTray := FindWindowEx( hDesktop, 0, 'Shell_TrayWnd', nil );
hReBar := FindWindowEx( hTray, 0, 'ReBarWindow32', nil );
hTask := FindWindowEx( hReBar, 0, 'MSTaskSwWClass', nil );
hToolbar := FindWindowEx( hTask, 0, 'ToolbarWindow32', nil );
if ( hToolbar = 0 ) then
MessageDlg(
'Taskbar konnte nicht gefunden werden',
mtError,
[mbOK],
0);
Result := hToolbar;
end;
|
|
Zitat
|