mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
use ictoopie_16 in tray
This commit is contained in:
parent
e403c419e5
commit
ec8550d587
|
@ -53,7 +53,7 @@ END
|
|||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
MAINICON ICON "ictoopie.ico"
|
||||
|
||||
IDI_ICON1 ICON "ictoopie_16.ico"
|
||||
#endif // English (United States) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -42,18 +42,7 @@ void AddTrayIcon (HWND hWnd)
|
|||
nid.uID = ID_TRAY_ICON;
|
||||
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
|
||||
nid.uCallbackMessage = WM_TRAYICON;
|
||||
// TODO: must set correct icon
|
||||
// nid.hIcon = LoadIcon (GetModuleHandle(NULL), MAKEINTRESOURCE (IDI_ICON1));
|
||||
{
|
||||
char szIconFile[512];
|
||||
|
||||
GetSystemDirectory( szIconFile, sizeof( szIconFile ) );
|
||||
if ( szIconFile[ strlen( szIconFile ) - 1 ] != '\\' )
|
||||
strcat( szIconFile, "\\" );
|
||||
strcat( szIconFile, "shell32.dll" );
|
||||
// Icon #23 (0-indexed) in shell32.dll is a "help" icon.
|
||||
ExtractIconEx( szIconFile, 23, NULL, &(nid.hIcon), 1 );
|
||||
}
|
||||
nid.hIcon = LoadIcon (GetModuleHandle(NULL), MAKEINTRESOURCE (IDI_ICON1));
|
||||
strcpy (nid.szTip, "i2pd");
|
||||
Shell_NotifyIcon(NIM_ADD, &nid );
|
||||
}
|
||||
|
@ -134,8 +123,8 @@ static LRESULT CALLBACK WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||
wclx.cbClsExtra = 0;
|
||||
wclx.cbWndExtra = 0;
|
||||
wclx.hInstance = hInst;
|
||||
wclx.hIcon = LoadIcon (hInst, MAKEINTRESOURCE (IDI_ICON1));
|
||||
wclx.hIconSm = LoadIcon (hInst, MAKEINTRESOURCE (IDI_ICON1));
|
||||
wclx.hIcon = LoadIcon (hInst, IDI_APPLICATION);
|
||||
wclx.hIconSm = LoadIcon (hInst, IDI_APPLICATION);
|
||||
wclx.hCursor = LoadCursor (NULL, IDC_ARROW);
|
||||
wclx.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
||||
wclx.lpszMenuName = NULL;
|
||||
|
|
Loading…
Reference in a new issue