【发布时间】:2011-11-21 05:27:44
【问题描述】:
我正在尝试将主要在后台运行的应用程序放置在 Windows Mobile 6.5 上的“托盘状”区域中。
我通过 Shell_NotifyIcon 以显而易见的方式做到这一点
BOOL ShowTrayIcon(HWND hWnd, HINSTANCE hIns, BOOL bShowIcon)
{
BOOL bRet = FALSE;
g_structNotifyIconData.cbSize = sizeof(NOTIFYICONDATA);
g_structNotifyIconData.hIcon = LoadIcon(hIns, MAKEINTRESOURCE(IDI_GPSCOMPASS));
g_structNotifyIconData.hWnd = hWnd;
g_structNotifyIconData.uCallbackMessage = WM_SYSTRAY_MSG;
g_structNotifyIconData.uFlags = NIF_MESSAGE | NIF_ICON;
g_structNotifyIconData.szTip[0] = 'Bzz';
g_structNotifyIconData.uID = ID_TRAY;
if (bShowIcon)
bRet = Shell_NotifyIcon(NIM_ADD, &g_structNotifyIconData);
else
bRet = Shell_NotifyIcon(NIM_DELETE, &g_structNotifyIconData);
return bRet;
}
这是我试图放置图标的地方:
Tray icon within the 'today' area http://www.fotoszok.pl/upload/666d99dc.jpg
Shell_NotifyIcon 会执行此操作,但图标未显示在今日屏幕上,我可以从任何地方看到它在托盘中除了今日/主屏幕。
现在我在某处读到,这是因为今天屏幕中的托盘区域是为系统通知保留的,“我们”不能在其中放置任何图标 - 如果这是真的,有人可以确认一下吗?
【问题讨论】:
标签: c++ winapi windows-mobile