Hi,<br>
ich versuche, mit folgendem Code den Text der Uhr zu verändern:<br>
<br>
program TrayClock;<br>
<br>
uses Windows, Messages;<br>
<br>
var<br>
TrayHandle: hWnd;<br>
<br>
begin<br>
TrayHandle := FindWindowEx(F indWindowEx(FindWindow('Shell_TrayWnd',<br>
&n bsp; &nbs p; &n bsp; &nbs p; nil),<br>
&n bsp; &nbs p; &n bsp; &nbs p;0,<br>
&n bsp; &nbs p; &n bsp; &nbs p;'TrayNotifyWnd',<br>
&n bsp; &nbs p; &n bsp; &nbs p;nil),<br>
&n bsp; &nbs p; 0,<br>
&n bsp; &nbs p; 'TrayClockWClass',<br>
&n bsp; &nbs p; nil);<br>
SendMessage(TrayHandle, WM_SETTEX T, 0, LPARAM(PChar('Test')));<br>
end.<br>
<br>
Das ganze funktioniert auch, WinSight32 zeigt tatsächlich den neuen Text an, aber unten in der Uhr steht er nicht. Wnn man die Messages von TrayClockWClass abhört, so wird WM_USER + 0x64 gesndet, wmm man die Maus bewegt. Jedesmal wenn WM_TIMER empfangen wird, so sendet TrayClockWClass WM_SETTEXT an sich selbst, es wird also mit WM_SETTEXT gearbeitet.<br>
Man hat mir geraten, WM_SETTEXT mit einem anderen wParam-Wert zu benutzen, da TrayClockWClass vielleicht auf diese Weise fremde von eigenen Messages unterscheidet, ich konnte jedoch nicht herausfinden, welchen Wert ich sonst senden sollte. Irgendjemand hat mir mal einen Link zu Inject-DLLs gegeben, aber den ist weg.<br>
<br>
Kann mir jemand sagen, was ich machen muss?
<br>
Danke im Voraus,
d3g
ich versuche, mit folgendem Code den Text der Uhr zu verändern:<br>
<br>
program TrayClock;<br>
<br>
uses Windows, Messages;<br>
<br>
var<br>
TrayHandle: hWnd;<br>
<br>
begin<br>
TrayHandle := FindWindowEx(F indWindowEx(FindWindow('Shell_TrayWnd',<br>
&n bsp; &nbs p; &n bsp; &nbs p; nil),<br>
&n bsp; &nbs p; &n bsp; &nbs p;0,<br>
&n bsp; &nbs p; &n bsp; &nbs p;'TrayNotifyWnd',<br>
&n bsp; &nbs p; &n bsp; &nbs p;nil),<br>
&n bsp; &nbs p; 0,<br>
&n bsp; &nbs p; 'TrayClockWClass',<br>
&n bsp; &nbs p; nil);<br>
SendMessage(TrayHandle, WM_SETTEX T, 0, LPARAM(PChar('Test')));<br>
end.<br>
<br>
Das ganze funktioniert auch, WinSight32 zeigt tatsächlich den neuen Text an, aber unten in der Uhr steht er nicht. Wnn man die Messages von TrayClockWClass abhört, so wird WM_USER + 0x64 gesndet, wmm man die Maus bewegt. Jedesmal wenn WM_TIMER empfangen wird, so sendet TrayClockWClass WM_SETTEXT an sich selbst, es wird also mit WM_SETTEXT gearbeitet.<br>
Man hat mir geraten, WM_SETTEXT mit einem anderen wParam-Wert zu benutzen, da TrayClockWClass vielleicht auf diese Weise fremde von eigenen Messages unterscheidet, ich konnte jedoch nicht herausfinden, welchen Wert ich sonst senden sollte. Irgendjemand hat mir mal einen Link zu Inject-DLLs gegeben, aber den ist weg.<br>
<br>
Kann mir jemand sagen, was ich machen muss?
<br>
Danke im Voraus,
d3g
Comment