能力值:
( LV3,RANK:20 )
|
-
-
2 楼
啥?程序在操作系统上第一次运行都是默认隐藏在三角里面的
|
能力值:
( LV2,RANK:10 )
|
-
-
3 楼
大牛,你的 Mdebug 有没有最新版本下载?
|
能力值:
( LV2,RANK:140 )
|
-
-
4 楼
据说,.net提供了相关的api可以操作。
|
能力值:
( LV2,RANK:10 )
|
-
-
5 楼
分析一下拖动到外边的时候操作系统有哪些调用,然后自行达到这种效果,对360来说不算太难
|
能力值:
( LV4,RANK:50 )
|
-
-
6 楼
我记得我的程序可以做到,你找找
|
能力值:
( LV3,RANK:20 )
|
-
-
7 楼
什么程序?怎么做到的?
|
能力值:
( LV3,RANK:20 )
|
-
-
8 楼
360现在做到了。不知道他是怎么弄的
|
能力值:
( LV2,RANK:10 )
|
-
-
9 楼
控制面板里 通知区域图标 可以设的嘛 抓消息或者注册表的看下
|
能力值:
( LV3,RANK:20 )
|
-
-
10 楼
我说用程序实现。
|
能力值:
( LV2,RANK:140 )
|
-
-
11 楼
这是将qq的图标挪到前面显示的..真搞不懂qq还专门弄个提示框叫用户手动改..各大im还纷纷效仿.
#include "stdafx.h"
#include <conio.h>
#include <windows.h>
#include <Shlwapi.h>
#pragma comment(lib, "shlwapi.lib")
typedef struct tagNOTIFYITEM
{
PWSTR pszExeName;
PWSTR pszTip;
HICON hIcon;
HWND hWnd;
DWORD dwPreference;
UINT uID;
GUID guidItem;
} NOTIFYITEM, *PNOTIFYITEM;
class __declspec(uuid("D782CCBA-AFB0-43F1-94DB-FDA3779EACCB")) INotificationCB : public IUnknown
{
virtual HRESULT __stdcall Notify (ULONG, NOTIFYITEM *) = 0;
};
class __declspec(uuid("FB852B2C-6BAD-4605-9551-F15F87830935")) ITrayNotify : public IUnknown
{
public:
virtual HRESULT __stdcall RegisterCallback(INotificationCB* callback) = 0;
virtual HRESULT __stdcall SetPreference(const NOTIFYITEM* notify_item) = 0;
virtual HRESULT __stdcall EnableAutoTray(BOOL enabled) = 0;
};
class __declspec(uuid("D133CE13-3537-48BA-93A7-AFCD5D2053B4")) ITrayNotifyWindows8 : public IUnknown
{
public:
virtual HRESULT __stdcall RegisterCallback(INotificationCB* callback, unsigned long*) = 0;
virtual HRESULT __stdcall UnregisterCallback(unsigned long*) = 0;
virtual HRESULT __stdcall SetPreference(NOTIFYITEM const*) = 0;
virtual HRESULT __stdcall EnableAutoTray(BOOL) = 0;
virtual HRESULT __stdcall DoAction(BOOL) = 0;
};
const CLSID CLSID_TrayNotify = {0x25DEAD04, 0x1EAC, 0x4911, {0x9E, 0x3A, 0xAD, 0x0A, 0x4A, 0xB5, 0x60, 0xFD}};
class NotificationMgr : public INotificationCB
{
public:
NotificationMgr(){
m_pTrayNotify = NULL;
}
HRESULT __stdcall QueryInterface (
REFIID riid,
PVOID *ppv)
{
if (ppv == NULL)
return E_POINTER;
if (riid == __uuidof (INotificationCB)) {
*ppv = (INotificationCB *) this;
}else if (riid == IID_IUnknown) {
*ppv = (IUnknown *) this;
}else{
return E_NOINTERFACE;
}
((IUnknown *) *ppv) -> AddRef ();
return S_OK;
}
ULONG __stdcall AddRef (VOID)
{
return 1;
}
ULONG __stdcall Release (VOID)
{
return 1;
}
HRESULT __stdcall Notify (ULONG Event, NOTIFYITEM * NotifyItem){
printf("event:%d Preference:%d id:%d path:%ls\n", Event, NotifyItem->dwPreference, NotifyItem->uID, NotifyItem->pszExeName);
if (StrStrIW(NotifyItem->pszExeName, L"qq.exe")){
if (m_pTrayNotify){
NotifyItem->dwPreference = 2;
m_pTrayNotify->SetPreference(NotifyItem);
}
}
return S_OK;
}
public:
ITrayNotify * m_pTrayNotify;
};
int _tmain(int argc, _TCHAR* argv[])
{
ITrayNotify *pTrayNotify;
NOTIFYITEM NotifyItem = {0};
NotificationMgr NotiMgr;
CoInitialize(NULL);
//
// for win7
//
HRESULT hr = CoCreateInstance (
CLSID_TrayNotify,
NULL,
CLSCTX_LOCAL_SERVER,
__uuidof(ITrayNotify),
(PVOID *)&pTrayNotify);
if (!SUCCEEDED(hr)){
printf("create instance of ITrayNotify error\n");
return -1;
}
//
// register callback
//
NotiMgr.m_pTrayNotify = pTrayNotify;
hr = pTrayNotify->RegisterCallback(&NotiMgr);
printf("over\n");
pTrayNotify->RegisterCallback(NULL);
pTrayNotify->Release();
_getch();
return 0;
}
|
能力值:
( LV2,RANK:140 )
|
-
-
12 楼
膜拜下写mingqq的大神..
|
能力值:
( LV4,RANK:40 )
|
-
-
13 楼
thx for share it ~~ but this code does not work
|
能力值:
( LV2,RANK:140 )
|
-
-
14 楼
把NotifyItem->dwPreference = 1;改成NotifyItem->dwPreference = 2;就好了
1是隐藏 2 是显示
|
能力值:
( LV3,RANK:20 )
|
-
-
15 楼
我测试了。怎么没效果,没办法把图标移动到前面
|
能力值:
( LV3,RANK:20 )
|
-
-
16 楼
果真可以,牛逼。谢谢了啊。大神
|
能力值:
( LV2,RANK:140 )
|
-
-
17 楼
我刚试了呀..可以呀..
之前
之后
|
能力值:
( LV3,RANK:20 )
|
-
-
18 楼
厉害。。。我终于查到这资料了。其实chrome 里面已经有现成的代码,只是我们没发现。。。。
|
能力值:
( LV2,RANK:10 )
|
-
-
19 楼
MARK一下
|
|
|