在VC 中如何隐藏一个主程序窗口
时间:2011-03-20 来源:情有独钟
ShowWindow(SW_HIDE);
NOTIFYICONDATA nid;
nid.cbSize = sizeof(NOTIFYICONDATA);
nid.hWnd= GetSafeHwnd();
nid.uID = ID_SYSTEMTRAY;
nid.uFlags = NIF_MESSAGE|NIF_ICON|NIF_TIP;
nid.uCallbackMessage = WM_SYSTEMTRAY;
nid.hIcon = AfxGetApp()->LoadIcon(IDI_SYSTEMTRAY_ICON );
strcpy( nid.szTip, "System Tray Tip" );
if (bTray==TRUE)
::Shell_NotifyIcon(NIM_ADD,&nid );
else
::Shell_NotifyIcon(NIM_DELETE, &nid);
相关阅读 更多 +