那里有关于IShellChangeNotify::OnChange的实例代码,跪谢!!

leexiaotian 2005-03-17 07:40:29
讲解IShellChangeNotify的内容网页,小弟深表感谢
...全文
63 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
蒋晟 2005-03-22
  • 打赏
  • 举报
回复
STDMETHODIMP CMyShellChangeNotify::OnChange(LONG lEvent,
LPCITEMIDLIST pidl1,
LPCITEMIDLIST pidl2)
{
HRESULT hr = E_FAIL;
int iImage;

switch(lEvent)
{
// An image in the system image list has changed.
case SHCNE_UPDATEIMAGE:
{
hr = S_OK;

if (pidl2)
iImage = SHHandleUpdateImage(pidl2);
else
iImage = *(int UNALIGNED *)((BYTE *)pidl1 + 2);

if (iImage != -1)
{
// Process iImage as desired.
}
break;
}
// Other cases
}
return hr;
}
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shhandleupdateimage.asp

2,640

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧