阅读:2564回复:5
最小化变成托盘如何实现
编写一个对话框程序,当点击最小化的时候,如何使它变成托盘?
|
|
沙发#
发布于:2008-08-12 22:04
|
|
板凳#
发布于:2008-08-12 22:06
还能搜到源码
课设时候偷懒直接用的源码交上去居然也能得优 |
|
地板#
发布于:2008-08-13 12:47
谢谢啊
|
|
地下室#
发布于:2008-08-13 13:41
//set process icon to tray
void SetIcon(HWND hWnd, BOOL bFlag) { NOTIFYICONDATAW nd; nd.cbSize = sizeof (NOTIFYICONDATAW); nd.hWnd = hWnd; nd.uID = IDI_TSPSET; nd.uFlags = NIF_ICON|NIF_MESSAGE|NIF_TIP;//NIF_INFO; nd.uCallbackMessage= WM_NOTIFYICON; nd.hIcon = LoadIcon(GetModuleHandle(0), MAKEINTRESOURCE(IDI_TSPSET)); lstrcpy(nd.szTip, _T("WSSet")); //Shell_NotifyIcon(NIM_DELETE, &nd); if(bFlag) { Shell_NotifyIcon(NIM_ADD, &nd); //lstrcpy(nd.szInfoTitle,_T("WSSet")); //lstrcpy(nd.szInfo,_T("WSSet")); //nd.uTimeout=100; //nd.uVersion=NOTIFYICON_VERSION; //Shell_NotifyIcon(NIM_MODIFY,&nd); } else Shell_NotifyIcon(NIM_DELETE, &nd); } |
|
|
5楼#
发布于:2008-08-13 18:20
谢谢啊
|
|