📄 taskbar.c
字号:
/*____________________________________________________________________________
Copyright (C) 1997 Network Associates Inc. and affiliated companies.
All rights reserved.
$Id: Taskbar.c,v 1.6 1999/03/10 03:03:33 heller Exp $
____________________________________________________________________________*/
#include "precomp.h"
BOOL TaskbarAddIcon(HWND hwnd, UINT uID, HICON hicon,
LPSTR lpszTip, UINT cbMsg)
{
BOOL result;
NOTIFYICONDATA tnid;
memset(&tnid,0x00,sizeof(NOTIFYICONDATA));
tnid.cbSize = sizeof(NOTIFYICONDATA);
tnid.hWnd = hwnd;
tnid.uID = uID;
tnid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
tnid.uCallbackMessage = cbMsg;
tnid.hIcon = hicon;
if(lpszTip)
{
strcpy(tnid.szTip, lpszTip);
}
result = Shell_NotifyIcon(NIM_ADD, &tnid);
if(hicon)
{
DestroyIcon(hicon);
}
return result;
}
BOOL TaskbarDeleteIcon(HWND hwnd, UINT uID)
{
BOOL result;
NOTIFYICONDATA tnid;
memset(&tnid,0x00,sizeof(NOTIFYICONDATA));
tnid.cbSize = sizeof(NOTIFYICONDATA);
tnid.hWnd = hwnd;
tnid.uID = uID;
result = Shell_NotifyIcon(NIM_DELETE, &tnid);
return result;
}
/*__Editor_settings____
Local Variables:
tab-width: 4
End:
vi: ts=4 sw=4
vim: si
_____________________*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -