Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Shell_NotifyIcon (Modify) funktioniert nicht! (https://www.delphipraxis.net/88120-shell_notifyicon-modify-funktioniert-nicht.html)

Muetze1 10. Mär 2007 16:21

Re: Shell_NotifyIcon (Modify) funktioniert nicht!
 
Delphi-Quellcode:
  NIM.hIcon := Icon.Handle;
  Shell_NotifyIcon(NIM_Modify, @NIM);

TStringlist 10. Mär 2007 16:21

Re: Shell_NotifyIcon (Modify) funktioniert nicht!
 
Zitat:

Zitat von woggly4
Also ich habe das jetzt mit
Delphi-Quellcode:
  Icon.Handle;
  Shell_NotifyIcon(NIM_Modify, @NIM);
ausprobiert, aber das funktioniert auch irgendwie nicht. Oder weise ich den handle einfach nur falsch zu?

So wie Du das IconHandle am Anfang ja auch in diese NotifyIconData-Structur geladen hast, genauso musst Du die Handle der neuen Icon da jetzt auch wieder reinladen, also etwa so:

Delphi-Quellcode:
NotifyIconData.hIcon := neueIconHandle;
Shell_NotifyIcon(NIM_MODIFY, @NotifyIconData);

woggly4 10. Mär 2007 18:28

Re: Shell_NotifyIcon (Modify) funktioniert nicht!
 
Hey ich bedanke mich bei euch...
Habe es jetzt mit
Delphi-Quellcode:
NIM.hIcon := Application.Icon.Handle;
  Shell_NotifyIcon(NIM_Modify, @NIM);
hinbekommen.

Danke!! :kiss:


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:41 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz